From dbe1ca008e47320cdbbb8c82b3d4cab7f9fe2673 Mon Sep 17 00:00:00 2001 From: chenglch Date: Mon, 12 Feb 2018 16:12:03 +0800 Subject: [PATCH] Rename the path name from chenglch to xcat2 As golang relys on path name heavily, this patch just rename the path for the owner to make the project compilable. --- Makefile | 6 +++--- README.md | 4 ++-- api/README.md | 2 +- api/command.go | 2 +- api/node.go | 8 ++++---- cmd/congo.go | 2 +- common/utils.go | 2 +- console/cli.go | 2 +- console/client.go | 2 +- console/console.go | 6 +++--- console/message.go | 2 +- console/pipeline/base.go | 4 ++-- console/pipeline/file.go | 2 +- console/pipeline/logger.go | 2 +- console/pipeline/pipeline.go | 2 +- console/pipeline/tcp.go | 2 +- console/pipeline/udp.go | 2 +- console/rpc.go | 4 ++-- console/server.go | 12 ++++++------ dirty-debuild | 2 +- dirty-rpmbuild | 4 ++-- etc/systemd/goconserver.service | 2 +- glide.yaml | 2 +- goconserver.go | 4 ++-- plugins/base.go | 4 ++-- plugins/cmd.go | 2 +- plugins/ssh.go | 2 +- plugins/sshcmd.go | 2 +- storage/etcd.go | 2 +- storage/file.go | 2 +- storage/storage.go | 4 ++-- 31 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 4ddf295..5d33f4b 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,8 @@ GOPATH?=$(shell pwd) export GOPATH PATH+=:$(shell pwd)/bin export PATH -GITHUB_DIR=${GOPATH}/src/github.com/chenglch/ -REPO_DIR=${GOPATH}/src/github.com/chenglch/goconserver +GITHUB_DIR=${GOPATH}/src/github.com/xcat2/ +REPO_DIR=${GOPATH}/src/github.com/xcat2/goconserver CURRENT_DIR=$(shell pwd) REPO_DIR_LINK=$(shell readlink -f ${REPO_DIR}) SERVER_CONF_FILE=/etc/goconserver/server.conf @@ -27,7 +27,7 @@ LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X all: build deps: go get github.com/Masterminds/glide - glide install + ${GOPATH}/bin/glide install link: REPO_DIR=${REPO_DIR}; \ diff --git a/README.md b/README.md index a0bcbe7..33b80b3 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ api interface. ### Setup goconserver from binary Download the binary tarball for release from -[goconserver](https://github.com/chenglch/goconserver/releases) +[goconserver](https://github.com/xcat2/goconserver/releases) ``` tar xvfz goconserver_linux_amd64.tar.gz cd goconserver_linux_amd64 @@ -88,7 +88,7 @@ Please setup golang SDK(1.9 or higher), GOPATH environment variable and ### Build and install ``` -git clone https://github.com/chenglch/goconserver.git +git clone https://github.com/xcat2/goconserver.git cd goconserver make deps make install diff --git a/api/README.md b/api/README.md index e9465ad..2282e34 100644 --- a/api/README.md +++ b/api/README.md @@ -7,7 +7,7 @@ POST /nodes "name": "node2", "driver": "ssh", "params": { - "user": "chenglch", + "user": "xcat2", "host": "10.0.0.2", "port": "22", "private_key": "~/.ssh/id_rsa" diff --git a/api/command.go b/api/command.go index a3354a4..c41aa49 100644 --- a/api/command.go +++ b/api/command.go @@ -5,7 +5,7 @@ import ( "net/http" "encoding/json" - "github.com/chenglch/goconserver/console" + "github.com/xcat2/goconserver/console" "github.com/gorilla/mux" ) diff --git a/api/node.go b/api/node.go index b2f9750..e144b44 100644 --- a/api/node.go +++ b/api/node.go @@ -6,15 +6,15 @@ import ( "io/ioutil" "net/http" - "github.com/chenglch/goconserver/common" - "github.com/chenglch/goconserver/console" - "github.com/chenglch/goconserver/storage" + "github.com/xcat2/goconserver/common" + "github.com/xcat2/goconserver/console" + "github.com/xcat2/goconserver/storage" "github.com/gorilla/mux" ) var ( nodeManager *console.NodeManager - plog = common.GetLogger("github.com/chenglch/goconserver/api/node") + plog = common.GetLogger("github.com/xcat2/goconserver/api/node") serverConfig = common.GetServerConfig() ) diff --git a/cmd/congo.go b/cmd/congo.go index fc75515..8afb5f7 100644 --- a/cmd/congo.go +++ b/cmd/congo.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/chenglch/goconserver/console" + "github.com/xcat2/goconserver/console" "github.com/spf13/cobra" ) diff --git a/common/utils.go b/common/utils.go index ea9d3fc..795bc84 100644 --- a/common/utils.go +++ b/common/utils.go @@ -36,7 +36,7 @@ const ( ) var ( - plog = GetLogger("github.com/chenglch/goconserver/common") + plog = GetLogger("github.com/xcat2/goconserver/common") ) func init() { diff --git a/console/cli.go b/console/cli.go index 7a05ce3..734628d 100644 --- a/console/cli.go +++ b/console/cli.go @@ -2,7 +2,7 @@ package console import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "github.com/spf13/cobra" "golang.org/x/crypto/ssh/terminal" "os" diff --git a/console/client.go b/console/client.go index bb84b83..f5813df 100644 --- a/console/client.go +++ b/console/client.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "encoding/json" "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "golang.org/x/crypto/ssh/terminal" "io" "net" diff --git a/console/console.go b/console/console.go index 92bc1ae..28e42c6 100644 --- a/console/console.go +++ b/console/console.go @@ -3,9 +3,9 @@ package console import ( "bytes" "fmt" - "github.com/chenglch/goconserver/common" - pl "github.com/chenglch/goconserver/console/pipeline" - "github.com/chenglch/goconserver/plugins" + "github.com/xcat2/goconserver/common" + pl "github.com/xcat2/goconserver/console/pipeline" + "github.com/xcat2/goconserver/plugins" "io" "net" "sync" diff --git a/console/message.go b/console/message.go index c16c770..cd5be93 100644 --- a/console/message.go +++ b/console/message.go @@ -2,7 +2,7 @@ package console import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "os" ) diff --git a/console/pipeline/base.go b/console/pipeline/base.go index 0c91bad..4ad525f 100644 --- a/console/pipeline/base.go +++ b/console/pipeline/base.go @@ -1,7 +1,7 @@ package logger import ( - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "time" ) @@ -14,7 +14,7 @@ const ( var ( PUBLISHER_INIT_MAP = map[string]func(interface{}) (Publisher, error){} LOGGER_INIT_MAP = map[string]func() Logger{} - plog = common.GetLogger("github.com/chenglch/goconserver/console/logger") + plog = common.GetLogger("github.com/xcat2/goconserver/console/logger") serverConfig = common.GetServerConfig() ) diff --git a/console/pipeline/file.go b/console/pipeline/file.go index c816fe3..00099c3 100644 --- a/console/pipeline/file.go +++ b/console/pipeline/file.go @@ -2,7 +2,7 @@ package logger import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "os" "path/filepath" ) diff --git a/console/pipeline/logger.go b/console/pipeline/logger.go index 0fca9af..184f952 100644 --- a/console/pipeline/logger.go +++ b/console/pipeline/logger.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "strings" "time" ) diff --git a/console/pipeline/pipeline.go b/console/pipeline/pipeline.go index 4e3df0a..2f8f7d9 100644 --- a/console/pipeline/pipeline.go +++ b/console/pipeline/pipeline.go @@ -1,7 +1,7 @@ package logger import ( - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "sync" ) diff --git a/console/pipeline/tcp.go b/console/pipeline/tcp.go index 06cb3dc..3b4884f 100644 --- a/console/pipeline/tcp.go +++ b/console/pipeline/tcp.go @@ -3,7 +3,7 @@ package logger import ( "crypto/tls" "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "net" "time" ) diff --git a/console/pipeline/udp.go b/console/pipeline/udp.go index ebd4c98..9c8d3a2 100644 --- a/console/pipeline/udp.go +++ b/console/pipeline/udp.go @@ -2,7 +2,7 @@ package logger import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "net" "time" ) diff --git a/console/rpc.go b/console/rpc.go index a6ffbcf..444aab2 100644 --- a/console/rpc.go +++ b/console/rpc.go @@ -3,8 +3,8 @@ package console import ( "context" "fmt" - "github.com/chenglch/goconserver/common" - pb "github.com/chenglch/goconserver/console/consolepb" + "github.com/xcat2/goconserver/common" + pb "github.com/xcat2/goconserver/console/consolepb" google_protobuf "github.com/golang/protobuf/ptypes/empty" net_context "golang.org/x/net/context" "google.golang.org/grpc" diff --git a/console/server.go b/console/server.go index dc097fa..ba02de6 100644 --- a/console/server.go +++ b/console/server.go @@ -4,11 +4,11 @@ import ( "crypto/tls" "encoding/json" "fmt" - "github.com/chenglch/goconserver/common" - pb "github.com/chenglch/goconserver/console/consolepb" - pl "github.com/chenglch/goconserver/console/pipeline" - "github.com/chenglch/goconserver/plugins" - "github.com/chenglch/goconserver/storage" + "github.com/xcat2/goconserver/common" + pb "github.com/xcat2/goconserver/console/consolepb" + pl "github.com/xcat2/goconserver/console/pipeline" + "github.com/xcat2/goconserver/plugins" + "github.com/xcat2/goconserver/storage" "net" "net/http" "os" @@ -32,7 +32,7 @@ const ( ) var ( - plog = common.GetLogger("github.com/chenglch/goconserver/console") + plog = common.GetLogger("github.com/xcat2/goconserver/console") nodeManager *NodeManager serverConfig = common.GetServerConfig() STATUS_MAP = map[int]string{ diff --git a/dirty-debuild b/dirty-debuild index dbc1e8c..16d6398 100755 --- a/dirty-debuild +++ b/dirty-debuild @@ -55,7 +55,7 @@ then echo echo "Examples:" echo " ${0##*/} goconserver_linux_ppc64le.tar.gz" - echo " ${0##*/} https://github.com/chenglch/goconserver/files/1505167/goconserver_linux_ppc64le.tar.gz" + echo " ${0##*/} https://github.com/xcat2/goconserver/files/1505167/goconserver_linux_ppc64le.tar.gz" exit 0 fi diff --git a/dirty-rpmbuild b/dirty-rpmbuild index 0f8b6d0..6c5c930 100755 --- a/dirty-rpmbuild +++ b/dirty-rpmbuild @@ -55,7 +55,7 @@ then echo echo "Examples:" echo " ${0##*/} goconserver_linux_ppc64le.tar.gz" - echo " ${0##*/} https://github.com/chenglch/goconserver/files/1505167/goconserver_linux_ppc64le.tar.gz" + echo " ${0##*/} https://github.com/xcat2/goconserver/files/1505167/goconserver_linux_ppc64le.tar.gz" exit 0 fi @@ -87,7 +87,7 @@ Release: snap$(date '+%Y%m%d%H%M') License: EPL Group: Applications/System BuildArch: ${ARCH} -URL: https://github.com/chenglch/goconserver/ +URL: https://github.com/xcat2/goconserver/ Vendor: IBM Corp. Packager: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} diff --git a/etc/systemd/goconserver.service b/etc/systemd/goconserver.service index 8837399..4cc4f18 100644 --- a/etc/systemd/goconserver.service +++ b/etc/systemd/goconserver.service @@ -1,6 +1,6 @@ [Unit] Description=goconserver console daemon -Documentation=https://github.com/chenglch/goconserver +Documentation=https://github.com/xcat2/goconserver [Service] LimitNOFILE=65535 diff --git a/glide.yaml b/glide.yaml index 54af2b4..bcca4cf 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,6 +1,6 @@ package: . import: -- package: github.com/chenglch/goconserver +- package: github.com/xcat2/goconserver subpackages: - api - common diff --git a/goconserver.go b/goconserver.go index ceb4fa0..fbafb46 100644 --- a/goconserver.go +++ b/goconserver.go @@ -4,8 +4,8 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "github.com/chenglch/goconserver/api" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/api" + "github.com/xcat2/goconserver/common" "github.com/gorilla/mux" "github.com/spf13/cobra" "io/ioutil" diff --git a/plugins/base.go b/plugins/base.go index 4a6aa44..a805edf 100644 --- a/plugins/base.go +++ b/plugins/base.go @@ -2,14 +2,14 @@ package plugins import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "io" ) var ( DRIVER_INIT_MAP = map[string]func(string, map[string]string) (ConsolePlugin, error){} DRIVER_VALIDATE_MAP = map[string]func(string, map[string]string) error{} - plog = common.GetLogger("github.com/chenglch/goconserver/plugins") + plog = common.GetLogger("github.com/xcat2/goconserver/plugins") ) type ConsoleSession interface { diff --git a/plugins/cmd.go b/plugins/cmd.go index 694179c..5a13da4 100644 --- a/plugins/cmd.go +++ b/plugins/cmd.go @@ -2,7 +2,7 @@ package plugins import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "github.com/kr/pty" "os" "os/exec" diff --git a/plugins/ssh.go b/plugins/ssh.go index 39a846a..869f2db 100644 --- a/plugins/ssh.go +++ b/plugins/ssh.go @@ -6,7 +6,7 @@ import ( "log" "time" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "golang.org/x/crypto/ssh" "net" "os" diff --git a/plugins/sshcmd.go b/plugins/sshcmd.go index 27f05a4..b994c81 100644 --- a/plugins/sshcmd.go +++ b/plugins/sshcmd.go @@ -2,7 +2,7 @@ package plugins import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "golang.org/x/crypto/ssh" "os" ) diff --git a/storage/etcd.go b/storage/etcd.go index 0d9cd0a..6bc5394 100644 --- a/storage/etcd.go +++ b/storage/etcd.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "github.com/coreos/etcd/clientv3" "os" "reflect" diff --git a/storage/file.go b/storage/file.go index 040166d..e5e2692 100644 --- a/storage/file.go +++ b/storage/file.go @@ -3,7 +3,7 @@ package storage import ( "encoding/json" "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" "io/ioutil" "path" "reflect" diff --git a/storage/storage.go b/storage/storage.go index b447998..20d44e5 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -2,12 +2,12 @@ package storage import ( "fmt" - "github.com/chenglch/goconserver/common" + "github.com/xcat2/goconserver/common" ) var ( serverConfig = common.GetServerConfig() - plog = common.GetLogger("github.com/chenglch/goconserver/storage") + plog = common.GetLogger("github.com/xcat2/goconserver/storage") STORAGE_INIT_MAP = map[string]func() StorInterface{} )