@cryptotaxi247 / kubo / commits / 488515c20

refactor(namesys) move proto to internal pb package

Brian Tiger Chow committed Oct 22, 2014 at 04:17 UTC 488515c207cef721239196b75dadf09254bfdc38
4 files changed +4 -2
namesys/internal/pb/entry.pb.go renamed
namesys/internal/pb/entry.proto renamed
namesys/publisher.go
+2 -1
@@ -9,6 +9,7 @@ import (
9 mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
10
11 ci "github.com/jbenet/go-ipfs/crypto"
12 + pb "github.com/jbenet/go-ipfs/namesys/internal/pb"
13 routing "github.com/jbenet/go-ipfs/routing"
14 u "github.com/jbenet/go-ipfs/util"
15 )
@@ -67,7 +68,7 @@ func (p *ipnsPublisher) Publish(k ci.PrivKey, value string) error {
68 }
69
70 func createRoutingEntryData(pk ci.PrivKey, val string) ([]byte, error) {
70 - entry := new(IpnsEntry)
71 + entry := new(pb.IpnsEntry)
72 sig, err := pk.Sign([]byte(val))
73 if err != nil {
74 return nil, err
namesys/routing.go
+2 -1
@@ -8,6 +8,7 @@ import (
8
9 mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
10 ci "github.com/jbenet/go-ipfs/crypto"
11 + pb "github.com/jbenet/go-ipfs/namesys/internal/pb"
12 routing "github.com/jbenet/go-ipfs/routing"
13 u "github.com/jbenet/go-ipfs/util"
14 )
@@ -54,7 +55,7 @@ func (r *routingResolver) Resolve(name string) (string, error) {
55 return "", err
56 }
57
57 - entry := new(IpnsEntry)
58 + entry := new(pb.IpnsEntry)
59 err = proto.Unmarshal(val, entry)
60 if err != nil {
61 return "", err