From 518855bedf587815bb00d525132937430e4c5632 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sat, 15 Jun 2019 15:58:41 +0200 Subject: [PATCH] refact(pkg): adapt go dependancies --- cmd/cmd.go | 10 +++++----- cmd/daemon/daemon.go | 4 ++-- cmd/sensor/add.go | 4 ++-- cmd/sensor/disable.go | 2 +- cmd/sensor/enable.go | 2 +- cmd/sensor/list.go | 4 ++-- cmd/sensor/remove.go | 2 +- cmd/sensor/rename.go | 2 +- cmd/temperature/list.go | 6 +++--- cmd/temperature/read.go | 8 ++++---- go.mod | 4 ++-- go.sum | 9 +-------- main.go | 2 +- pkg/cli/cli.go | 6 +++--- pkg/config/flucky.go | 4 ++-- pkg/daemon/daemon.go | 8 ++++---- pkg/internal/collect/humidity.go | 2 +- pkg/internal/collect/temperatures.go | 2 +- pkg/internal/temperature/temperature.go | 4 ++-- pkg/logfile/logfile.go | 2 +- pkg/sensor/dht11.go | 2 +- pkg/sensor/dht22.go | 2 +- pkg/sensor/ds18b20.go | 2 +- pkg/sensor/interfaces.go | 2 +- pkg/sensor/sensor.go | 6 +++--- 25 files changed, 47 insertions(+), 54 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 2d16aae..89ae1af 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -5,14 +5,14 @@ import ( "os" "time" - "github.com/volker-raschek/flucky/cmd/daemon" - "github.com/volker-raschek/flucky/cmd/sensor" - "github.com/volker-raschek/flucky/cmd/temperature" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/cmd/daemon" + "github.com/go-flucky/flucky/cmd/sensor" + "github.com/go-flucky/flucky/cmd/temperature" + "github.com/go-flucky/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/config" uuid "github.com/satori/go.uuid" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" ) var configPath string diff --git a/cmd/daemon/daemon.go b/cmd/daemon/daemon.go index 0e8eb24..3a2e8bb 100644 --- a/cmd/daemon/daemon.go +++ b/cmd/daemon/daemon.go @@ -3,9 +3,9 @@ package daemon import ( "log" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/daemon" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/daemon" ) var configPath string diff --git a/cmd/sensor/add.go b/cmd/sensor/add.go index cdadd8f..5078307 100644 --- a/cmd/sensor/add.go +++ b/cmd/sensor/add.go @@ -4,9 +4,9 @@ import ( "fmt" "log" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/types" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/types" ) var enabled bool diff --git a/cmd/sensor/disable.go b/cmd/sensor/disable.go index 30d9a40..6d58870 100644 --- a/cmd/sensor/disable.go +++ b/cmd/sensor/disable.go @@ -3,8 +3,8 @@ package sensor import ( "log" + "github.com/go-flucky/flucky/pkg/config" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" ) var disableSensorCmd = &cobra.Command{ diff --git a/cmd/sensor/enable.go b/cmd/sensor/enable.go index 012df0b..61c8f2f 100644 --- a/cmd/sensor/enable.go +++ b/cmd/sensor/enable.go @@ -3,8 +3,8 @@ package sensor import ( "log" + "github.com/go-flucky/flucky/pkg/config" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" ) var enableSensorCmd = &cobra.Command{ diff --git a/cmd/sensor/list.go b/cmd/sensor/list.go index e3e8e2c..3dce877 100644 --- a/cmd/sensor/list.go +++ b/cmd/sensor/list.go @@ -4,9 +4,9 @@ import ( "log" "os" + "github.com/go-flucky/flucky/pkg/cli" + "github.com/go-flucky/flucky/pkg/config" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/cli" - "github.com/volker-raschek/flucky/pkg/config" ) var listSensorCmd = &cobra.Command{ diff --git a/cmd/sensor/remove.go b/cmd/sensor/remove.go index d266e1a..f97aea5 100644 --- a/cmd/sensor/remove.go +++ b/cmd/sensor/remove.go @@ -3,8 +3,8 @@ package sensor import ( "log" + "github.com/go-flucky/flucky/pkg/config" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" ) var rmSensorCmd = &cobra.Command{ diff --git a/cmd/sensor/rename.go b/cmd/sensor/rename.go index 7d6b034..c567911 100644 --- a/cmd/sensor/rename.go +++ b/cmd/sensor/rename.go @@ -4,8 +4,8 @@ import ( "fmt" "log" + "github.com/go-flucky/flucky/pkg/config" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/config" ) var renameSensorCmd = &cobra.Command{ diff --git a/cmd/temperature/list.go b/cmd/temperature/list.go index bdd0877..aa6b4a8 100644 --- a/cmd/temperature/list.go +++ b/cmd/temperature/list.go @@ -5,10 +5,10 @@ import ( "log" "os" + "github.com/go-flucky/flucky/pkg/cli" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/logfile" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/cli" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/logfile" ) var listTemperatureCmd = &cobra.Command{ diff --git a/cmd/temperature/read.go b/cmd/temperature/read.go index d24daf9..4e145a4 100644 --- a/cmd/temperature/read.go +++ b/cmd/temperature/read.go @@ -5,11 +5,11 @@ import ( "log" "os" + "github.com/go-flucky/flucky/pkg/cli" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/logfile" + "github.com/go-flucky/flucky/pkg/sensor" "github.com/spf13/cobra" - "github.com/volker-raschek/flucky/pkg/cli" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/logfile" - "github.com/volker-raschek/flucky/pkg/sensor" ) var compression bool diff --git a/go.mod b/go.mod index 421d415..bde783d 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,10 @@ -module github.com/volker-raschek/flucky +module github.com/go-flucky/flucky go 1.12 require ( github.com/MichaelS11/go-dht v0.0.0-20181004212404-be44b9ee7fec + github.com/go-flucky/go-dht v0.1.1 github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/kr/pretty v0.1.0 // indirect github.com/satori/go.uuid v1.2.0 @@ -11,7 +12,6 @@ require ( github.com/spf13/pflag v1.0.3 // indirect github.com/vishvananda/netlink v1.0.0 github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect - github.com/volker-raschek/go-dht v0.1.0 github.com/yryz/ds18b20 v0.0.0-20180211073435-3cf383a40624 golang.org/x/sys v0.0.0-20190613124609-5ed2794edfdc // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect diff --git a/go.sum b/go.sum index 08cba13..449387a 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,9 @@ github.com/MichaelS11/go-dht v0.0.0-20181004212404-be44b9ee7fec h1:xMo0OOokExQqY/MRsTz6azUwy0udvlqhkJwQ5jZ6eN4= github.com/MichaelS11/go-dht v0.0.0-20181004212404-be44b9ee7fec/go.mod h1:NTx2rUi8kfs8Qk9Fotoyf/3lQnKBdc2mhyZqO4AhVLI= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/go-flucky/go-dht v0.1.1/go.mod h1:Yk/cct+/u+eCS7pB/kc0tc7MrVXdFI4W15MJCj5FRUc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -13,16 +11,11 @@ github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/vishvananda/netlink v1.0.0 h1:bqNY2lgheFIu1meHUFSH3d7vG93AFyqg3oGbJCOJgSM= github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc h1:R83G5ikgLMxrBvLh22JhdfI8K6YXEPHx5P03Uu3DRs4= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/volker-raschek/go-dht v0.1.0/go.mod h1:Fjv93K0m5sjdN/0ls8EeB4blawrEQVpda8HfSobPet4= github.com/yryz/ds18b20 v0.0.0-20180211073435-3cf383a40624 h1:bePzgtpuLSl+F9aacwuaquuoOyKfMKuJORq2CvPPJK4= github.com/yryz/ds18b20 v0.0.0-20180211073435-3cf383a40624/go.mod h1:MqFju5qeLDFh+S9PqxYT7TEla8xeW7bgGr/69q3oki0= -golang.org/x/sys v0.0.0-20190613124609-5ed2794edfdc h1:x+/QxSNkVFAC+v4pL1f6mZr1z+qgi+FoR8ccXZPVC10= golang.org/x/sys v0.0.0-20190613124609-5ed2794edfdc/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= periph.io/x/periph v3.4.0+incompatible h1:5gzxE4ryPq52cdqSw0mErR6pyJK8cBF2qdUAcOWh0bo= periph.io/x/periph v3.4.0+incompatible/go.mod h1:EWr+FCIU2dBWz5/wSWeiIUJTriYv9v2j2ENBmgYyy7Y= diff --git a/main.go b/main.go index f114fd7..70d36f1 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "os" "os/user" - "github.com/volker-raschek/flucky/cmd" + "github.com/go-flucky/flucky/cmd" ) var version string diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 2fc7428..77b238d 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -5,9 +5,9 @@ import ( "io" "text/tabwriter" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/internal/temperature" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/internal/temperature" + "github.com/go-flucky/flucky/pkg/types" ) // PrintHumidities displays a list of humidities diff --git a/pkg/config/flucky.go b/pkg/config/flucky.go index 636e3d5..1bd9d8d 100644 --- a/pkg/config/flucky.go +++ b/pkg/config/flucky.go @@ -5,10 +5,10 @@ import ( "time" - "github.com/volker-raschek/flucky/pkg/sensor" + "github.com/go-flucky/flucky/pkg/sensor" + "github.com/go-flucky/flucky/pkg/types" uuid "github.com/satori/go.uuid" - "github.com/volker-raschek/flucky/pkg/types" ) var humiditySensorModels = map[types.SensorModel]types.SensorModel{ diff --git a/pkg/daemon/daemon.go b/pkg/daemon/daemon.go index 5a755c2..a7f4431 100644 --- a/pkg/daemon/daemon.go +++ b/pkg/daemon/daemon.go @@ -8,10 +8,10 @@ import ( "syscall" "time" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/logfile" - "github.com/volker-raschek/flucky/pkg/sensor" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/logfile" + "github.com/go-flucky/flucky/pkg/sensor" + "github.com/go-flucky/flucky/pkg/types" ) // Start the daemon diff --git a/pkg/internal/collect/humidity.go b/pkg/internal/collect/humidity.go index e1c3abc..8dc8ae4 100644 --- a/pkg/internal/collect/humidity.go +++ b/pkg/internal/collect/humidity.go @@ -1,6 +1,6 @@ package collect -import "github.com/volker-raschek/flucky/pkg/types" +import "github.com/go-flucky/flucky/pkg/types" func Humidities(humidityChannel <-chan *types.Humidity) []*types.Humidity { humidityList := make([]*types.Humidity, 0) diff --git a/pkg/internal/collect/temperatures.go b/pkg/internal/collect/temperatures.go index cecda0d..1c4bc4c 100644 --- a/pkg/internal/collect/temperatures.go +++ b/pkg/internal/collect/temperatures.go @@ -1,7 +1,7 @@ package collect import ( - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/types" ) func Temperatures(temperatureChannel <-chan *types.Temperature) []*types.Temperature { diff --git a/pkg/internal/temperature/temperature.go b/pkg/internal/temperature/temperature.go index cf4d7a6..8889aa1 100644 --- a/pkg/internal/temperature/temperature.go +++ b/pkg/internal/temperature/temperature.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/volker-raschek/flucky/pkg/config" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/config" + "github.com/go-flucky/flucky/pkg/types" ) // GetSensorsByTemperatures returns commulated list of sensors by temperature values diff --git a/pkg/logfile/logfile.go b/pkg/logfile/logfile.go index 2ab06bd..737acf4 100644 --- a/pkg/logfile/logfile.go +++ b/pkg/logfile/logfile.go @@ -9,7 +9,7 @@ import ( "sort" "time" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/types" ) // CompressTemperature compresses the temperatures from an array. It is checked diff --git a/pkg/sensor/dht11.go b/pkg/sensor/dht11.go index 945f2e2..6c65dfc 100644 --- a/pkg/sensor/dht11.go +++ b/pkg/sensor/dht11.go @@ -5,8 +5,8 @@ import ( "time" "github.com/MichaelS11/go-dht" + "github.com/go-flucky/flucky/pkg/types" uuid "github.com/satori/go.uuid" - "github.com/volker-raschek/flucky/pkg/types" ) // DHT11 is a sensor to measure humidity and temperature. diff --git a/pkg/sensor/dht22.go b/pkg/sensor/dht22.go index 1740ee1..ab6890e 100644 --- a/pkg/sensor/dht22.go +++ b/pkg/sensor/dht22.go @@ -5,8 +5,8 @@ import ( "time" "github.com/MichaelS11/go-dht" + "github.com/go-flucky/flucky/pkg/types" uuid "github.com/satori/go.uuid" - "github.com/volker-raschek/flucky/pkg/types" ) // DHT22 is a sensor to measure humidity and temperature. diff --git a/pkg/sensor/ds18b20.go b/pkg/sensor/ds18b20.go index 4aaae16..0e43e47 100644 --- a/pkg/sensor/ds18b20.go +++ b/pkg/sensor/ds18b20.go @@ -4,8 +4,8 @@ import ( "fmt" "time" + "github.com/go-flucky/flucky/pkg/types" uuid "github.com/satori/go.uuid" - "github.com/volker-raschek/flucky/pkg/types" "github.com/yryz/ds18b20" ) diff --git a/pkg/sensor/interfaces.go b/pkg/sensor/interfaces.go index 16c1f2f..61efba6 100644 --- a/pkg/sensor/interfaces.go +++ b/pkg/sensor/interfaces.go @@ -1,6 +1,6 @@ package sensor -import "github.com/volker-raschek/flucky/pkg/types" +import "github.com/go-flucky/flucky/pkg/types" // HumiditySensor is a interface to describe required functions to measure humidities type HumiditySensor interface { diff --git a/pkg/sensor/sensor.go b/pkg/sensor/sensor.go index 95ca0eb..4874ca4 100644 --- a/pkg/sensor/sensor.go +++ b/pkg/sensor/sensor.go @@ -3,9 +3,9 @@ package sensor import ( "sync" - "github.com/volker-raschek/flucky/pkg/internal/collect" - "github.com/volker-raschek/flucky/pkg/internal/prittyprint" - "github.com/volker-raschek/flucky/pkg/types" + "github.com/go-flucky/flucky/pkg/internal/collect" + "github.com/go-flucky/flucky/pkg/internal/prittyprint" + "github.com/go-flucky/flucky/pkg/types" ) // ReadHumidities returns a list of measured humidities by humidity sensors