22 lines
447 B
Go
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
|
|
}
|