data_workshop/way.go

19 lines
353 B
Go
Raw Permalink Normal View History

2020-05-22 07:39:43 +00:00
package main
import (
context "context"
)
var ways = &KeyList{}
// wayserver can be embedded to have forward compatible implementations.
type wayserver struct {
}
// Name 街道名字
2020-05-22 07:39:43 +00:00
func (ws *wayserver) Name(ctx context.Context, req *Request) (*Reply, error) {
reply := &Reply{}
reply.Message = GetRandomKey(ways).(string)
return reply, nil
}