data_workshop/building.go
2020-05-22 15:39:43 +08:00

22 lines
447 B
Go

package main
import (
context "context"
)
var buildinglist = &KeyList{}
func init() {
LoadGob("./data/building.gob", buildinglist)
}
// UnimplementedBuildingServer can be embedded to have forward compatible implementations.
type buildingserver struct {
}
func (bs *buildingserver) Name(ctx context.Context, req *Request) (*Reply, error) {
reply := &Reply{}
reply.Message = string(GetRandomKey(buildinglist).([]byte))
return reply, nil
}