From 57d2e734aa28826bc29aa49713db31b09194f7b6 Mon Sep 17 00:00:00 2001 From: Byung Jun Park Date: Fri, 14 Jul 2017 22:58:21 +0900 Subject: [PATCH] ing --- .gitignore | 3 ++- main.go | 17 +---------------- version.go | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 version.go diff --git a/.gitignore b/.gitignore index 4f67da3..dd99617 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,5 @@ fabric.properties *.iml vendor/ -glide.lock \ No newline at end of file +glide.lock +.DS_Store \ No newline at end of file diff --git a/main.go b/main.go index 4b9fe20..f7598ac 100644 --- a/main.go +++ b/main.go @@ -12,21 +12,6 @@ import ( "git.loafle.net/overflow/overflow_service_websocket/server" ) -const ( - version = "1.0.0" - website = "https://www.overflow.cloud" - banner = ` - - ██████╗ ██╗ ██╗███████╗██████╗ ███████╗██╗ ██████╗ ██╗ ██╗ -██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝██║ ██╔═══██╗██║ ██║ -██║ ██║██║ ██║█████╗ ██████╔╝█████╗ ██║ ██║ ██║██║ █╗ ██║ -██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗██╔══╝ ██║ ██║ ██║██║███╗██║ -╚██████╔╝ ╚████╔╝ ███████╗██║ ██║██║ ███████╗╚██████╔╝╚███╔███╔╝ - ╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ - -` -) - func main() { // Initialize config @@ -36,7 +21,7 @@ func main() { useTLS := config.Server.Tls sConfig := server.NewOptions(&config.Websocket) // Print banner - log.Println(banner) + printVersion() // Config TLS diff --git a/version.go b/version.go new file mode 100644 index 0000000..ca6b794 --- /dev/null +++ b/version.go @@ -0,0 +1,24 @@ +package main + +import "log" + +const ( + version = "1.0.0" + website = "https://www.overflow.cloud" + banner = ` + + ██████╗ ██╗ ██╗███████╗██████╗ ███████╗██╗ ██████╗ ██╗ ██╗ +██╔═══██╗██║ ██║██╔════╝██╔══██╗██╔════╝██║ ██╔═══██╗██║ ██║ +██║ ██║██║ ██║█████╗ ██████╔╝█████╗ ██║ ██║ ██║██║ █╗ ██║ +██║ ██║╚██╗ ██╔╝██╔══╝ ██╔══██╗██╔══╝ ██║ ██║ ██║██║███╗██║ +╚██████╔╝ ╚████╔╝ ███████╗██║ ██║██║ ███████╗╚██████╔╝╚███╔███╔╝ + ╚═════╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ + +` +) + +func printVersion() { + log.Printf("Version: %s\n", version) + log.Printf("Url: %s\n", website) + log.Println(banner) +}