diff --git a/main.go b/main.go index aee7fa821..2e8de2bdc 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ var ( peers = &etcdhttp.Peers{} addrs = &Addrs{} - cors = &CORSInfo{} + cors = &pkg.CORSInfo{} proxyFlag = new(ProxyFlag) proxyFlagValues = []string{ @@ -208,11 +208,11 @@ func startEtcd() { } s.Start() - ch := &CORSHandler{ + ch := &pkg.CORSHandler{ Handler: etcdhttp.NewClientHandler(s, *peers, *timeout), Info: cors, } - ph := &CORSHandler{ + ph := &pkg.CORSHandler{ Handler: etcdhttp.NewPeerHandler(s), Info: cors, } @@ -255,7 +255,7 @@ func startProxy() { log.Fatal(err) } - ph = &CORSHandler{ + ph = &pkg.CORSHandler{ Handler: ph, Info: cors, } diff --git a/cors.go b/pkg/cors.go similarity index 99% rename from cors.go rename to pkg/cors.go index 19e92007b..7c913af7f 100644 --- a/cors.go +++ b/pkg/cors.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package pkg import ( "fmt"