Skip to content

gk update svc

Compare
Choose a tag to compare
@yiv yiv released this 09 Jul 14:07
· 28 commits to master since this release

Add support of updating exist service

type Service interface {
	FooToo(ctx context.Context, inParam string) (outParam string, err error)
}

At first, you have a method for the interface, then you run:

gk init svc

After that, you add a another method to the interface, like below:

type Service interface {
	FooToo(ctx context.Context, inParam string) (outParam string, err error)
	TooToo(ctx context.Context, in string) (out []string, err error)
}

Befor this release, you have to delete the previous files, and run "gk init svc" again, now you can run

gk update svc

limits

  • only update codes in directory of service and endpoint, and transport of http
  • not work for pb directory and grpc transport