Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

V0.8 go r59 #6

Closed
wants to merge 2 commits into from

2 participants

@kesselborn

this makes doozer compile with go r59. Two types of problems occured to me:

1.) some function signatures changed
2.) the provided generated protobuffer files did not work for me, i.e. I removed *.pb.go files from the repository and added them to be removed when clean is called -- they get auto generated when all.sh is executed.

Problems:

func (e response_Err) String() string {...}

was in the generated protobuffer file and in err.go (differently implemented). I removed it from err.go ... don't know if that is ok or not

@mreiferson
Owner

OBE see #21

@mreiferson mreiferson closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 159 deletions.
  1. +1 −1  Makefile
  2. +1 −1  cmd/doozer/doozer.go
  3. +0 −11 err.go
  4. +0 −146 msg.pb.go
View
2  Makefile
@@ -22,4 +22,4 @@ msg.pb.go: msg.proto
|gofmt >$@
rm -rf _pb
-CLEANFILES+=_pb
+CLEANFILES+=_pb *.pb.go
View
2  cmd/doozer/doozer.go
@@ -67,7 +67,7 @@ func usage() {
names = append(names, k)
us[k] = u
}
- sort.SortStrings(names)
+ sort.Strings(names)
for _, k := range names {
fmt.Fprintf(os.Stderr, " %-*s - %s\n", max, us[k], cmds[k].d)
}
View
11 err.go
@@ -1,7 +1,6 @@
package doozer
import (
- "fmt"
"goprotobuf.googlecode.com/hg/proto"
"os"
)
@@ -24,16 +23,6 @@ var (
ErrReadonly response_Err = response_READONLY
)
-
-func (e response_Err) String() string {
- s := response_Err_name[int32(e)]
- if s == "" {
- s = fmt.Sprint("unknown error ", e)
- }
- return s
-}
-
-
type Error struct {
Err os.Error
Detail string
View
146 msg.pb.go
@@ -1,146 +0,0 @@
-// Code generated by protoc-gen-go from "msg.proto"
-// DO NOT EDIT!
-
-package doozer
-
-import proto "goprotobuf.googlecode.com/hg/proto"
-import "math"
-import "os"
-
-// Reference proto, math & os imports to suppress error if they are not otherwise used.
-var _ = proto.GetString
-var _ = math.Inf
-var _ os.Error
-
-
-type request_Verb int32
-
-const (
- request_GET = 1
- request_SET = 2
- request_DEL = 3
- request_REV = 5
- request_WAIT = 6
- request_NOP = 7
- request_WALK = 9
- request_GETDIR = 14
- request_STAT = 16
- request_ACCESS = 99
-)
-
-var request_Verb_name = map[int32]string{
- 1: "GET",
- 2: "SET",
- 3: "DEL",
- 5: "REV",
- 6: "WAIT",
- 7: "NOP",
- 9: "WALK",
- 14: "GETDIR",
- 16: "STAT",
- 99: "ACCESS",
-}
-var request_Verb_value = map[string]int32{
- "GET": 1,
- "SET": 2,
- "DEL": 3,
- "REV": 5,
- "WAIT": 6,
- "NOP": 7,
- "WALK": 9,
- "GETDIR": 14,
- "STAT": 16,
- "ACCESS": 99,
-}
-
-func newRequest_Verb(x int32) *request_Verb {
- e := request_Verb(x)
- return &e
-}
-
-type response_Err int32
-
-const (
- response_OTHER = 127
- response_TAG_IN_USE = 1
- response_UNKNOWN_VERB = 2
- response_READONLY = 3
- response_TOO_LATE = 4
- response_REV_MISMATCH = 5
- response_BAD_PATH = 6
- response_MISSING_ARG = 7
- response_RANGE = 8
- response_NOTDIR = 20
- response_ISDIR = 21
- response_NOENT = 22
-)
-
-var response_Err_name = map[int32]string{
- 127: "OTHER",
- 1: "TAG_IN_USE",
- 2: "UNKNOWN_VERB",
- 3: "READONLY",
- 4: "TOO_LATE",
- 5: "REV_MISMATCH",
- 6: "BAD_PATH",
- 7: "MISSING_ARG",
- 8: "RANGE",
- 20: "NOTDIR",
- 21: "ISDIR",
- 22: "NOENT",
-}
-var response_Err_value = map[string]int32{
- "OTHER": 127,
- "TAG_IN_USE": 1,
- "UNKNOWN_VERB": 2,
- "READONLY": 3,
- "TOO_LATE": 4,
- "REV_MISMATCH": 5,
- "BAD_PATH": 6,
- "MISSING_ARG": 7,
- "RANGE": 8,
- "NOTDIR": 20,
- "ISDIR": 21,
- "NOENT": 22,
-}
-
-func newResponse_Err(x int32) *response_Err {
- e := response_Err(x)
- return &e
-}
-
-type request struct {
- Tag *int32 "PB(varint,1,opt,name=tag)"
- Verb *request_Verb "PB(varint,2,opt,name=verb,enum=doozer.request_Verb)"
- Path *string "PB(bytes,4,opt,name=path)"
- Value []byte "PB(bytes,5,opt,name=value)"
- OtherTag *int32 "PB(varint,6,opt,name=other_tag)"
- Offset *int32 "PB(varint,7,opt,name=offset)"
- Rev *int64 "PB(varint,9,opt,name=rev)"
- XXX_unrecognized []byte
-}
-
-func (this *request) Reset() {
- *this = request{}
-}
-
-type response struct {
- Tag *int32 "PB(varint,1,opt,name=tag)"
- Flags *int32 "PB(varint,2,opt,name=flags)"
- Rev *int64 "PB(varint,3,opt,name=rev)"
- Path *string "PB(bytes,5,opt,name=path)"
- Value []byte "PB(bytes,6,opt,name=value)"
- Len *int32 "PB(varint,8,opt,name=len)"
- ErrCode *response_Err "PB(varint,100,opt,name=err_code,enum=doozer.response_Err)"
- ErrDetail *string "PB(bytes,101,opt,name=err_detail)"
- XXX_unrecognized []byte
-}
-
-func (this *response) Reset() {
- *this = response{}
-}
-
-func init() {
- proto.RegisterEnum("doozer.request_Verb", request_Verb_name, request_Verb_value)
- proto.RegisterEnum("doozer.response_Err", response_Err_name, response_Err_value)
-}
Something went wrong with that request. Please try again.