Update README.md
This commit is contained in:
parent
ff49b4fc71
commit
ca9b877646
@ -57,12 +57,15 @@ To make use of Go Micro
|
|||||||
```golang
|
```golang
|
||||||
import "github.com/micro/go-micro/v2"
|
import "github.com/micro/go-micro/v2"
|
||||||
|
|
||||||
|
// create a new service
|
||||||
service := micro.NewService(
|
service := micro.NewService(
|
||||||
micro.Name("helloworld"),
|
micro.Name("helloworld"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// initialise flags
|
||||||
service.Init()
|
service.Init()
|
||||||
|
|
||||||
|
// start the service
|
||||||
service.Run()
|
service.Run()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user