From 410481644d1943726e863215ee1bb8bf11cd0112 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 4 Nov 2017 23:34:42 +0100 Subject: [PATCH] Move my source from the vendor folder --- vendor/src/statusscreen/Config.go => config.go | 2 +- main.go | 11 +++++------ vendor/src/statusscreen/Clock.go => module-clock.go | 2 +- vendor/src/statusscreen/SL.go => module-sl.go | 2 +- .../src/statusscreen/Weather.go => module-weather.go | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) rename vendor/src/statusscreen/Config.go => config.go (92%) rename vendor/src/statusscreen/Clock.go => module-clock.go (94%) rename vendor/src/statusscreen/SL.go => module-sl.go (99%) rename vendor/src/statusscreen/Weather.go => module-weather.go (98%) diff --git a/vendor/src/statusscreen/Config.go b/config.go similarity index 92% rename from vendor/src/statusscreen/Config.go rename to config.go index 4c0a208..5ccf6b9 100644 --- a/vendor/src/statusscreen/Config.go +++ b/config.go @@ -1,4 +1,4 @@ -package statusscreen +package main // Config is a struct with my config type Config struct { diff --git a/main.go b/main.go index af755d9..1f1c8c5 100644 --- a/main.go +++ b/main.go @@ -6,16 +6,15 @@ import ( tm "github.com/buger/goterm" "io/ioutil" "os" - "statusscreen" "time" ) func main() { config := getConfig("status.toml") - sl := statusscreen.SL{Config: &config} - clock := statusscreen.Clock{Config: &config} - weather := statusscreen.Weather{Config: &config} + sl := SL{Config: &config} + clock := Clock{Config: &config} + weather := Weather{Config: &config} tm.Clear() tm.Print("\033[?25l") @@ -45,8 +44,8 @@ func main() { } } -func getConfig(configFile string) statusscreen.Config { - var config statusscreen.Config +func getConfig(configFile string) Config { + var config Config // Read the configfile file, err := ioutil.ReadFile(configFile) diff --git a/vendor/src/statusscreen/Clock.go b/module-clock.go similarity index 94% rename from vendor/src/statusscreen/Clock.go rename to module-clock.go index a053c53..64429b4 100644 --- a/vendor/src/statusscreen/Clock.go +++ b/module-clock.go @@ -1,4 +1,4 @@ -package statusscreen +package main import ( "github.com/common-nighthawk/go-figure" diff --git a/vendor/src/statusscreen/SL.go b/module-sl.go similarity index 99% rename from vendor/src/statusscreen/SL.go rename to module-sl.go index a229c39..fe56ba7 100644 --- a/vendor/src/statusscreen/SL.go +++ b/module-sl.go @@ -1,4 +1,4 @@ -package statusscreen +package main import ( "bytes" diff --git a/vendor/src/statusscreen/Weather.go b/module-weather.go similarity index 98% rename from vendor/src/statusscreen/Weather.go rename to module-weather.go index e5c2451..4e6dfda 100644 --- a/vendor/src/statusscreen/Weather.go +++ b/module-weather.go @@ -1,4 +1,4 @@ -package statusscreen +package main import ( "io/ioutil"