refact(pkg): adapt go dependancies
This commit is contained in:
parent
05cd62c624
commit
518855bedf
10
cmd/cmd.go
10
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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{
|
||||
|
@ -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
|
||||
|
4
go.mod
4
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
|
||||
|
9
go.sum
9
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=
|
||||
|
2
main.go
2
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
|
||||
|
@ -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
|
||||
|
@ -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{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user