Update README.md

This commit is contained in:
Asim Aslam 2020-08-07 11:22:57 +01:00 committed by GitHub
parent b6ab124d83
commit d61cbd29db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,13 +19,11 @@ type Cache interface {
## Usage ## Usage
```go ```go
import ( import "github.com/micro/go-micro/registry/cache"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/cache"
)
r := registry.NewRegistry() # create a new cache
cache := cache.New(r) c := cache.New(registry)
services, _ := cache.GetService("my.service") # get a service from the cache
services, _ := c.GetService("helloworld")
``` ```