Fixup import paths

This commit is contained in:
Asim 2015-05-05 19:05:06 +01:00
parent 480165695c
commit 45a619c2c6
12 changed files with 41 additions and 33 deletions

View File

@ -1,10 +1,10 @@
# Go Micro
Go Micro is a microservices client/server library utilising HTTP/RPC and protobuf. It is part of the [Micro](https://github.com/asim/micro) toolchain.
Go Micro is a microservices client/server library utilising HTTP/RPC and protobuf. It is part of the [Micro](https://github.com/myodc/micro) toolchain.
An example server can be found in go-micro/template.
[![GoDoc](http://img.shields.io/badge/go-documentation-brightgreen.svg?style=flat-square)](https://godoc.org/github.com/asim/go-micro)
[![GoDoc](http://img.shields.io/badge/go-documentation-brightgreen.svg?style=flat-square)](https://godoc.org/github.com/myodc/go-micro)
## Prerequisites
@ -54,7 +54,7 @@ message Response {
}
```
Compile proto `protoc -I$GOPATH/src --go_out=$GOPATH/src $GOPATH/src/github.com/asim/go-micro/template/proto/example/example.proto`
Compile proto `protoc -I$GOPATH/src --go_out=$GOPATH/src $GOPATH/src/github.com/myodc/go-micro/template/proto/example/example.proto`
### Create request handler
`go-micro/template/handler/example.go`:
@ -64,10 +64,10 @@ package handler
import (
"code.google.com/p/go.net/context"
"code.google.com/p/goprotobuf/proto"
"github.com/golang/protobuf/proto"
"github.com/asim/go-micro/server"
example "github.com/asim/go-micro/template/proto/example"
"github.com/myodc/go-micro/server"
example "github.com/myodc/go-micro/template/proto/example"
log "github.com/golang/glog"
)
@ -89,8 +89,8 @@ func (e *Example) Call(ctx context.Context, req *example.Request, rsp *example.R
package main
import (
"github.com/asim/go-micro/server"
"github.com/asim/go-micro/template/handler"
"github.com/myodc/go-micro/server"
"github.com/myodc/go-micro/template/handler"
log "github.com/golang/glog"
)

View File

@ -16,9 +16,9 @@ import (
"time"
"code.google.com/p/go-uuid/uuid"
"github.com/asim/go-micro/errors"
"github.com/asim/go-micro/registry"
log "github.com/golang/glog"
"github.com/myodc/go-micro/errors"
"github.com/myodc/go-micro/registry"
)
type HttpBroker struct {

View File

@ -9,8 +9,8 @@ import (
"net/url"
"time"
"github.com/asim/go-micro/errors"
"github.com/asim/go-micro/registry"
"github.com/myodc/go-micro/errors"
"github.com/myodc/go-micro/registry"
rpc "github.com/youtube/vitess/go/rpcplus"
js "github.com/youtube/vitess/go/rpcplus/jsonrpc"
pb "github.com/youtube/vitess/go/rpcplus/pbrpc"

View File

@ -5,10 +5,10 @@ import (
"text/tabwriter"
"text/template"
"github.com/asim/go-micro/registry"
"github.com/asim/go-micro/server"
"github.com/asim/go-micro/store"
"github.com/codegangsta/cli"
"github.com/myodc/go-micro/registry"
"github.com/myodc/go-micro/server"
"github.com/myodc/go-micro/store"
)
var (

View File

@ -4,7 +4,7 @@ import (
"fmt"
"time"
"github.com/asim/go-micro/broker"
"github.com/myodc/go-micro/broker"
)
var (

View File

@ -3,9 +3,9 @@ package main
import (
"fmt"
"code.google.com/p/goprotobuf/proto"
"github.com/asim/go-micro/client"
example "github.com/asim/go-micro/template/proto/example"
"github.com/golang/protobuf/proto"
"github.com/myodc/go-micro/client"
example "github.com/myodc/go-micro/template/proto/example"
)
func main() {

View File

@ -10,8 +10,8 @@ import (
"strconv"
"sync"
"github.com/asim/go-micro/errors"
log "github.com/golang/glog"
"github.com/myodc/go-micro/errors"
rpc "github.com/youtube/vitess/go/rpcplus"
js "github.com/youtube/vitess/go/rpcplus/jsonrpc"
pb "github.com/youtube/vitess/go/rpcplus/pbrpc"

View File

@ -8,8 +8,8 @@ import (
"syscall"
"code.google.com/p/go-uuid/uuid"
"github.com/asim/go-micro/registry"
log "github.com/golang/glog"
"github.com/myodc/go-micro/registry"
)
type Server interface {

View File

@ -4,8 +4,8 @@ import (
"net/http"
"sync"
"github.com/asim/go-micro/client"
log "github.com/golang/glog"
"github.com/myodc/go-micro/client"
)
var ctxs = struct {

View File

@ -2,11 +2,11 @@ package handler
import (
"code.google.com/p/go.net/context"
"code.google.com/p/goprotobuf/proto"
"github.com/golang/protobuf/proto"
"github.com/asim/go-micro/server"
example "github.com/asim/go-micro/template/proto/example"
log "github.com/golang/glog"
"github.com/myodc/go-micro/server"
example "github.com/myodc/go-micro/template/proto/example"
)
type Example struct{}

View File

@ -1,10 +1,10 @@
package main
import (
"github.com/asim/go-micro/cmd"
"github.com/asim/go-micro/server"
"github.com/asim/go-micro/template/handler"
log "github.com/golang/glog"
"github.com/myodc/go-micro/cmd"
"github.com/myodc/go-micro/server"
"github.com/myodc/go-micro/template/handler"
)
func main() {

View File

@ -1,16 +1,24 @@
// Code generated by protoc-gen-go.
// source: asim/go-micro/template/proto/example/example.proto
// source: myodc/go-micro/template/proto/example/example.proto
// DO NOT EDIT!
/*
Package go_micro_service_template_example is a generated protocol buffer package.
It is generated from these files:
myodc/go-micro/template/proto/example/example.proto
It has these top-level messages:
Request
Response
*/
package go_micro_service_template_example
import proto "code.google.com/p/goprotobuf/proto"
import json "encoding/json"
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type Request struct {