From 1ff743c598656246f759988a3126ace3d6fa62bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 5 Oct 2021 22:38:24 +0200 Subject: [PATCH] rename package. --- server/build | 2 +- server/cmd/neko/main.go | 6 +++--- server/cmd/root.go | 2 +- server/cmd/serve.go | 4 ++-- server/go.mod | 2 +- server/internal/broadcast/manager.go | 4 ++-- server/internal/gst/gst.go | 2 +- server/internal/http/http.go | 6 +++--- server/internal/http/middleware/recover.go | 2 +- server/internal/http/response/response.go | 2 +- server/internal/remote/manager.go | 9 +++++---- server/internal/session/manager.go | 4 ++-- server/internal/session/session.go | 7 ++++--- server/internal/types/config/webrtc.go | 3 ++- server/internal/types/message/messages.go | 2 +- server/internal/webrtc/webrtc.go | 4 ++-- server/internal/websocket/admin.go | 6 +++--- server/internal/websocket/broadcast.go | 6 +++--- server/internal/websocket/chat.go | 6 +++--- server/internal/websocket/control.go | 6 +++--- server/internal/websocket/handler.go | 8 ++++---- server/internal/websocket/screen.go | 6 +++--- server/internal/websocket/session.go | 6 +++--- server/internal/websocket/signal.go | 6 +++--- server/internal/websocket/websocket.go | 10 +++++----- server/internal/xorg/xorg.go | 2 +- server/neko.go | 14 +++++++------- 27 files changed, 70 insertions(+), 67 deletions(-) diff --git a/server/build b/server/build index 895b12a..89c9c99 100755 --- a/server/build +++ b/server/build @@ -7,4 +7,4 @@ GIT_COMMIT=`git rev-parse --short HEAD` GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD` GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"` -go build -o bin/neko -ldflags "-s -X 'n.eko.moe/neko.buildDate=${BUILD_TIME}' -X 'n.eko.moe/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}' -X 'n.eko.moe/neko.gitBranch=${GIT_BRANCH}'" -i cmd/neko/main.go +go build -o bin/neko -ldflags "-s -X 'm1k1o/neko.buildDate=${BUILD_TIME}' -X 'm1k1o/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}' -X 'm1k1o/neko.gitBranch=${GIT_BRANCH}'" -i cmd/neko/main.go diff --git a/server/cmd/neko/main.go b/server/cmd/neko/main.go index d4de0bf..a1a2206 100644 --- a/server/cmd/neko/main.go +++ b/server/cmd/neko/main.go @@ -5,9 +5,9 @@ import ( "github.com/rs/zerolog/log" - "n.eko.moe/neko" - "n.eko.moe/neko/cmd" - "n.eko.moe/neko/internal/utils" + "m1k1o/neko" + "m1k1o/neko/cmd" + "m1k1o/neko/internal/utils" ) func main() { diff --git a/server/cmd/root.go b/server/cmd/root.go index f110257..d939802 100644 --- a/server/cmd/root.go +++ b/server/cmd/root.go @@ -14,7 +14,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "n.eko.moe/neko" + "m1k1o/neko" ) func Execute() error { diff --git a/server/cmd/serve.go b/server/cmd/serve.go index b6a7807..5b1162d 100644 --- a/server/cmd/serve.go +++ b/server/cmd/serve.go @@ -4,8 +4,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "n.eko.moe/neko" - "n.eko.moe/neko/internal/types/config" + "m1k1o/neko" + "m1k1o/neko/internal/types/config" ) func init() { diff --git a/server/go.mod b/server/go.mod index 69422af..3e05420 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,4 +1,4 @@ -module n.eko.moe/neko +module m1k1o/neko go 1.17 diff --git a/server/internal/broadcast/manager.go b/server/internal/broadcast/manager.go index 5f7ac83..8af58e2 100644 --- a/server/internal/broadcast/manager.go +++ b/server/internal/broadcast/manager.go @@ -6,8 +6,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/gst" - "n.eko.moe/neko/internal/types/config" + "m1k1o/neko/internal/gst" + "m1k1o/neko/internal/types/config" ) type BroadcastManager struct { diff --git a/server/internal/gst/gst.go b/server/internal/gst/gst.go index fe23bcb..ea5551d 100644 --- a/server/internal/gst/gst.go +++ b/server/internal/gst/gst.go @@ -14,7 +14,7 @@ import ( "time" "unsafe" - "n.eko.moe/neko/internal/types" + "m1k1o/neko/internal/types" ) /* diff --git a/server/internal/http/http.go b/server/internal/http/http.go index 810dddd..b7e508d 100644 --- a/server/internal/http/http.go +++ b/server/internal/http/http.go @@ -11,9 +11,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/http/middleware" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/config" + "m1k1o/neko/internal/http/middleware" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/config" ) type Server struct { diff --git a/server/internal/http/middleware/recover.go b/server/internal/http/middleware/recover.go index 53f28e3..65812b4 100644 --- a/server/internal/http/middleware/recover.go +++ b/server/internal/http/middleware/recover.go @@ -6,7 +6,7 @@ package middleware import ( "net/http" - "n.eko.moe/neko/internal/http/endpoint" + "m1k1o/neko/internal/http/endpoint" ) func Recoverer(next http.Handler) http.Handler { diff --git a/server/internal/http/response/response.go b/server/internal/http/response/response.go index ea53baa..73041ab 100644 --- a/server/internal/http/response/response.go +++ b/server/internal/http/response/response.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - "n.eko.moe/neko/internal/http/endpoint" + "m1k1o/neko/internal/http/endpoint" ) // JSON encodes data to rw in JSON format. Returns a pointer to a diff --git a/server/internal/remote/manager.go b/server/internal/remote/manager.go index e78f944..20aba63 100644 --- a/server/internal/remote/manager.go +++ b/server/internal/remote/manager.go @@ -5,13 +5,14 @@ import ( "os/exec" "time" + "m1k1o/neko/internal/gst" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/config" + "m1k1o/neko/internal/xorg" + "github.com/kataras/go-events" "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/gst" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/config" - "n.eko.moe/neko/internal/xorg" ) type RemoteManager struct { diff --git a/server/internal/session/manager.go b/server/internal/session/manager.go index 9b31b34..6f6be09 100644 --- a/server/internal/session/manager.go +++ b/server/internal/session/manager.go @@ -8,8 +8,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/utils" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/utils" ) func New(remote types.RemoteManager) *SessionManager { diff --git a/server/internal/session/session.go b/server/internal/session/session.go index 75b4a77..be43d0f 100644 --- a/server/internal/session/session.go +++ b/server/internal/session/session.go @@ -1,10 +1,11 @@ package session import ( + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" + "github.com/rs/zerolog" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" ) type Session struct { diff --git a/server/internal/types/config/webrtc.go b/server/internal/types/config/webrtc.go index 8c04cdf..3924ce7 100644 --- a/server/internal/types/config/webrtc.go +++ b/server/internal/types/config/webrtc.go @@ -5,10 +5,11 @@ import ( "strconv" "strings" + "m1k1o/neko/internal/utils" + "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" - "n.eko.moe/neko/internal/utils" "github.com/pion/webrtc/v3" ) diff --git a/server/internal/types/message/messages.go b/server/internal/types/message/messages.go index cf0b289..f6651d4 100644 --- a/server/internal/types/message/messages.go +++ b/server/internal/types/message/messages.go @@ -1,7 +1,7 @@ package message import ( - "n.eko.moe/neko/internal/types" + "m1k1o/neko/internal/types" "github.com/pion/webrtc/v3" ) diff --git a/server/internal/webrtc/webrtc.go b/server/internal/webrtc/webrtc.go index 809c267..7c4f0b7 100644 --- a/server/internal/webrtc/webrtc.go +++ b/server/internal/webrtc/webrtc.go @@ -13,8 +13,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/config" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/config" ) func New(sessions types.SessionManager, remote types.RemoteManager, config *config.WebRTC) *WebRTCManager { diff --git a/server/internal/websocket/admin.go b/server/internal/websocket/admin.go index 1063f27..3153471 100644 --- a/server/internal/websocket/admin.go +++ b/server/internal/websocket/admin.go @@ -3,9 +3,9 @@ package websocket import ( "strings" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) adminLock(id string, session types.Session) error { diff --git a/server/internal/websocket/broadcast.go b/server/internal/websocket/broadcast.go index 336cc90..1eb8bcd 100644 --- a/server/internal/websocket/broadcast.go +++ b/server/internal/websocket/broadcast.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) boradcastCreate(session types.Session, payload *message.BroadcastCreate) error { diff --git a/server/internal/websocket/chat.go b/server/internal/websocket/chat.go index 8f68b5d..6b1392d 100644 --- a/server/internal/websocket/chat.go +++ b/server/internal/websocket/chat.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) chat(id string, session types.Session, payload *message.ChatReceive) error { diff --git a/server/internal/websocket/control.go b/server/internal/websocket/control.go index 442ef3f..ff783b1 100644 --- a/server/internal/websocket/control.go +++ b/server/internal/websocket/control.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) controlRelease(id string, session types.Session) error { diff --git a/server/internal/websocket/handler.go b/server/internal/websocket/handler.go index bdd0d4e..aad245d 100644 --- a/server/internal/websocket/handler.go +++ b/server/internal/websocket/handler.go @@ -6,10 +6,10 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" - "n.eko.moe/neko/internal/utils" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" + "m1k1o/neko/internal/utils" ) type MessageHandler struct { diff --git a/server/internal/websocket/screen.go b/server/internal/websocket/screen.go index 2547f63..44e6af1 100644 --- a/server/internal/websocket/screen.go +++ b/server/internal/websocket/screen.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) screenSet(id string, session types.Session, payload *message.ScreenResolution) error { diff --git a/server/internal/websocket/session.go b/server/internal/websocket/session.go index 8288b2d..5e3ca47 100644 --- a/server/internal/websocket/session.go +++ b/server/internal/websocket/session.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) SessionCreated(id string, session types.Session) error { diff --git a/server/internal/websocket/signal.go b/server/internal/websocket/signal.go index e24db55..00bf930 100644 --- a/server/internal/websocket/signal.go +++ b/server/internal/websocket/signal.go @@ -1,9 +1,9 @@ package websocket import ( - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" ) func (h *MessageHandler) signalProvide(id string, session types.Session) error { diff --git a/server/internal/websocket/websocket.go b/server/internal/websocket/websocket.go index f5222af..3e2cd57 100644 --- a/server/internal/websocket/websocket.go +++ b/server/internal/websocket/websocket.go @@ -11,11 +11,11 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "n.eko.moe/neko/internal/types" - "n.eko.moe/neko/internal/types/config" - "n.eko.moe/neko/internal/types/event" - "n.eko.moe/neko/internal/types/message" - "n.eko.moe/neko/internal/utils" + "m1k1o/neko/internal/types" + "m1k1o/neko/internal/types/config" + "m1k1o/neko/internal/types/event" + "m1k1o/neko/internal/types/message" + "m1k1o/neko/internal/utils" ) func New(sessions types.SessionManager, remote types.RemoteManager, broadcast types.BroadcastManager, webrtc types.WebRTCManager, conf *config.WebSocket) *WebSocketHandler { diff --git a/server/internal/xorg/xorg.go b/server/internal/xorg/xorg.go index 015ec4a..e958ce8 100644 --- a/server/internal/xorg/xorg.go +++ b/server/internal/xorg/xorg.go @@ -14,7 +14,7 @@ import ( "time" "unsafe" - "n.eko.moe/neko/internal/types" + "m1k1o/neko/internal/types" ) var ScreenConfigurations = make(map[int]types.ScreenConfiguration) diff --git a/server/neko.go b/server/neko.go index 93a93b5..ed91be8 100644 --- a/server/neko.go +++ b/server/neko.go @@ -6,13 +6,13 @@ import ( "os/signal" "runtime" - "n.eko.moe/neko/internal/broadcast" - "n.eko.moe/neko/internal/http" - "n.eko.moe/neko/internal/remote" - "n.eko.moe/neko/internal/session" - "n.eko.moe/neko/internal/types/config" - "n.eko.moe/neko/internal/webrtc" - "n.eko.moe/neko/internal/websocket" + "m1k1o/neko/internal/broadcast" + "m1k1o/neko/internal/http" + "m1k1o/neko/internal/remote" + "m1k1o/neko/internal/session" + "m1k1o/neko/internal/types/config" + "m1k1o/neko/internal/webrtc" + "m1k1o/neko/internal/websocket" "github.com/rs/zerolog" "github.com/rs/zerolog/log"