From 488515c207cef721239196b75dadf09254bfdc38 Mon Sep 17 00:00:00 2001
From: Brian Tiger Chow <brian.holderchow@gmail.com>
Date: Wed, 22 Oct 2014 04:17:20 -0700
Subject: [PATCH] refactor(namesys) move proto to internal pb package

---
 namesys/{ => internal/pb}/entry.pb.go | 0
 namesys/{ => internal/pb}/entry.proto | 0
 namesys/publisher.go                  | 3 ++-
 namesys/routing.go                    | 3 ++-
 4 files changed, 4 insertions(+), 2 deletions(-)
 rename namesys/{ => internal/pb}/entry.pb.go (100%)
 rename namesys/{ => internal/pb}/entry.proto (100%)

diff --git a/namesys/entry.pb.go b/namesys/internal/pb/entry.pb.go
similarity index 100%
rename from namesys/entry.pb.go
rename to namesys/internal/pb/entry.pb.go
diff --git a/namesys/entry.proto b/namesys/internal/pb/entry.proto
similarity index 100%
rename from namesys/entry.proto
rename to namesys/internal/pb/entry.proto
diff --git a/namesys/publisher.go b/namesys/publisher.go
index 88533f8a0..7203fb1d4 100644
--- a/namesys/publisher.go
+++ b/namesys/publisher.go
@@ -9,6 +9,7 @@ import (
 	mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
 
 	ci "github.com/jbenet/go-ipfs/crypto"
+	pb "github.com/jbenet/go-ipfs/namesys/internal/pb"
 	routing "github.com/jbenet/go-ipfs/routing"
 	u "github.com/jbenet/go-ipfs/util"
 )
@@ -67,7 +68,7 @@ func (p *ipnsPublisher) Publish(k ci.PrivKey, value string) error {
 }
 
 func createRoutingEntryData(pk ci.PrivKey, val string) ([]byte, error) {
-	entry := new(IpnsEntry)
+	entry := new(pb.IpnsEntry)
 	sig, err := pk.Sign([]byte(val))
 	if err != nil {
 		return nil, err
diff --git a/namesys/routing.go b/namesys/routing.go
index da1c05d0e..ce1755f69 100644
--- a/namesys/routing.go
+++ b/namesys/routing.go
@@ -8,6 +8,7 @@ import (
 
 	mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
 	ci "github.com/jbenet/go-ipfs/crypto"
+	pb "github.com/jbenet/go-ipfs/namesys/internal/pb"
 	routing "github.com/jbenet/go-ipfs/routing"
 	u "github.com/jbenet/go-ipfs/util"
 )
@@ -54,7 +55,7 @@ func (r *routingResolver) Resolve(name string) (string, error) {
 		return "", err
 	}
 
-	entry := new(IpnsEntry)
+	entry := new(pb.IpnsEntry)
 	err = proto.Unmarshal(val, entry)
 	if err != nil {
 		return "", err
-- 
GitLab