1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

remove use of glog

This commit is contained in:
Asim
2016-03-14 11:01:10 +00:00
parent c0b25e7a65
commit d1eae8fabe
12 changed files with 46 additions and 85 deletions

View File

@ -1,7 +1,8 @@
package main
import (
log "github.com/golang/glog"
"log"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/examples/server/subscriber"
"github.com/micro/go-micro/server"
@ -13,16 +14,16 @@ import (
type Example struct{}
func (e *Example) Call(ctx context.Context, req *example.Request, rsp *example.Response) error {
log.Info("Received Example.Call request")
log.Print("Received Example.Call request")
rsp.Msg = server.DefaultOptions().Id + ": Hello " + req.Name
return nil
}
func (e *Example) Stream(ctx context.Context, req *example.StreamingRequest, stream example.Example_StreamStream) error {
log.Infof("Received Example.Stream request with count: %d", req.Count)
log.Printf("Received Example.Stream request with count: %d", req.Count)
for i := 0; i < int(req.Count); i++ {
log.Infof("Responding: %d", i)
log.Printf("Responding: %d", i)
if err := stream.Send(&example.StreamingResponse{
Count: int64(i),
}); err != nil {
@ -39,7 +40,7 @@ func (e *Example) PingPong(ctx context.Context, stream example.Example_PingPongS
if err != nil {
return err
}
log.Infof("Got ping %v", req.Stroke)
log.Printf("Got ping %v", req.Stroke)
if err := stream.Send(&example.Pong{Stroke: req.Stroke}); err != nil {
return err
}