Browse Source

Move my source from the vendor folder

master
Elis Hirwing 2 years ago
parent
commit
410481644d
Signed by: etu <elis@hirwing.se> GPG Key ID: D57EFA625C9A925F
5 changed files with 9 additions and 10 deletions
  1. +1
    -1
      config.go
  2. +5
    -6
      main.go
  3. +1
    -1
      module-clock.go
  4. +1
    -1
      module-sl.go
  5. +1
    -1
      module-weather.go

vendor/src/statusscreen/Config.go → config.go View File

@@ -1,4 +1,4 @@
package statusscreen
package main

// Config is a struct with my config
type Config struct {

+ 5
- 6
main.go View File

@@ -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)


vendor/src/statusscreen/Clock.go → module-clock.go View File

@@ -1,4 +1,4 @@
package statusscreen
package main

import (
"github.com/common-nighthawk/go-figure"

vendor/src/statusscreen/SL.go → module-sl.go View File

@@ -1,4 +1,4 @@
package statusscreen
package main

import (
"bytes"

vendor/src/statusscreen/Weather.go → module-weather.go View File

@@ -1,4 +1,4 @@
package statusscreen
package main

import (
"io/ioutil"

Loading…
Cancel
Save