From c5233d578a53a03052bac2e97e8e4e49f3e91f4c Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 12 May 2019 11:57:53 +0200 Subject: [PATCH] fix: rename packages --- Makefile | 20 ++++---------------- cmd/cmd.go | 14 +++++++------- cmd/humidity/get.go | 2 +- cmd/logger/add.go | 4 ++-- cmd/logger/list.go | 4 ++-- cmd/logger/rm.go | 2 +- cmd/remote/add.go | 2 +- cmd/remote/disable.go | 2 +- cmd/remote/enable.go | 2 +- cmd/remote/list.go | 4 ++-- cmd/remote/remove.go | 2 +- cmd/remote/rename.go | 2 +- cmd/sensor/add.go | 4 ++-- cmd/sensor/disable.go | 2 +- cmd/sensor/enable.go | 2 +- cmd/sensor/list.go | 4 ++-- cmd/sensor/rename.go | 2 +- cmd/sensor/rm.go | 2 +- cmd/temperature/log.go | 4 ++-- cmd/temperature/read.go | 6 +++--- go.mod | 2 -- go.sum | 8 ++++---- main.go | 2 +- pkg/cli/cli.go | 8 ++++---- pkg/config/fluckyconfig.go | 6 +++--- pkg/config/remote.go | 2 +- pkg/internal/temperature/temperature.go | 4 ++-- pkg/logger/file_logger.go | 2 +- pkg/logger/logger.go | 2 +- pkg/sensor/dht11.go | 2 +- pkg/sensor/dht22.go | 2 +- pkg/sensor/ds18b20.go | 2 +- pkg/sensor/sensor.go | 4 ++-- 33 files changed, 59 insertions(+), 73 deletions(-) diff --git a/Makefile b/Makefile index f3f3e51..1ff5ebc 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,10 @@ # UID or GID is the UNIX user ID or group ID of the user who executes # make. If the UID or GID is not passed as a make variable, an attempt # is made to determine it. -UID?=$(shell id -u) -GID?=$(shell id -g) +UID?=$(shell id --user) +GID?=$(shell id --group) # VERSION -# UID/GID -# UID or GID is the UNIX user ID or group ID of the user who executes -# make. If the UID or GID is not passed as a make variable, an attempt -# is made to determine it. -UID?=$(shell id -u) -GID?=$(shell id -g) - # If no version is specified as a parameter of make, the last git hash # value is taken. VERSION:=$(or ${TRAVIS_TAG}, ${TRAVIS_TAG}, $(shell git rev-parse --short HEAD)-git) @@ -25,15 +18,10 @@ build: GOOS=${GOOS} \ GOARCH=${GOARCH} \ go build -ldflags "-X main.version=${VERSION}" + chown -R ${UID}:${GID} * docker-build: docker run \ --volume ${PWD}:/workspace \ volkerraschek/build-image:1.0.0 \ - make build VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH} - -docker-sanitized: - docker run \ - --volume ${PWD}:/workspace \ - volkerraschek/build-image:1.0.0 \ - chown ${UID}:${GID} -R /workspace \ No newline at end of file + make build UID=${UID} GID=${GID} VERSION=${VERSION} GOOS=${GOOS} GOARCH=${GOARCH} diff --git a/cmd/cmd.go b/cmd/cmd.go index dbc3385..d8c4ab2 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -5,16 +5,16 @@ import ( "os" "time" - lg "git.cryptic.systems/fh-trier/go-flucky/cmd/logger" - "git.cryptic.systems/fh-trier/go-flucky/cmd/remote" - "git.cryptic.systems/fh-trier/go-flucky/cmd/sensor" - "git.cryptic.systems/fh-trier/go-flucky/cmd/temperature" - "git.cryptic.systems/fh-trier/go-flucky/pkg/logger" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + lg "github.com/volker-raschek/flucky/cmd/logger" + "github.com/volker-raschek/flucky/cmd/remote" + "github.com/volker-raschek/flucky/cmd/sensor" + "github.com/volker-raschek/flucky/cmd/temperature" + "github.com/volker-raschek/flucky/pkg/logger" + "github.com/volker-raschek/flucky/pkg/types" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" uuid "github.com/satori/go.uuid" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var cfg string diff --git a/cmd/humidity/get.go b/cmd/humidity/get.go index c052a09..5bca5b0 100644 --- a/cmd/humidity/get.go +++ b/cmd/humidity/get.go @@ -3,8 +3,8 @@ package humidity import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/humidity" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/humidity" ) var follow, push bool diff --git a/cmd/logger/add.go b/cmd/logger/add.go index 777061b..64aefa9 100644 --- a/cmd/logger/add.go +++ b/cmd/logger/add.go @@ -3,10 +3,10 @@ package logger import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/logger" + "github.com/volker-raschek/flucky/pkg/logger" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var enabled bool diff --git a/cmd/logger/list.go b/cmd/logger/list.go index 74bb13e..8c867d0 100644 --- a/cmd/logger/list.go +++ b/cmd/logger/list.go @@ -4,9 +4,9 @@ import ( "log" "os" - "git.cryptic.systems/fh-trier/go-flucky/pkg/cli" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/cli" + "github.com/volker-raschek/flucky/pkg/config" ) var quiet bool diff --git a/cmd/logger/rm.go b/cmd/logger/rm.go index 0ceb7ab..7b24ec2 100644 --- a/cmd/logger/rm.go +++ b/cmd/logger/rm.go @@ -3,8 +3,8 @@ package logger import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var rmLoggerCmd = &cobra.Command{ diff --git a/cmd/remote/add.go b/cmd/remote/add.go index c7abbeb..969cfc8 100644 --- a/cmd/remote/add.go +++ b/cmd/remote/add.go @@ -3,8 +3,8 @@ package remote import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var enabled bool diff --git a/cmd/remote/disable.go b/cmd/remote/disable.go index 15c6ce8..20ef5c6 100644 --- a/cmd/remote/disable.go +++ b/cmd/remote/disable.go @@ -3,8 +3,8 @@ package remote import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var disableRemoteCmd = &cobra.Command{ diff --git a/cmd/remote/enable.go b/cmd/remote/enable.go index ce0f4ee..7d3525b 100644 --- a/cmd/remote/enable.go +++ b/cmd/remote/enable.go @@ -3,8 +3,8 @@ package remote import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var enableRemoteCmd = &cobra.Command{ diff --git a/cmd/remote/list.go b/cmd/remote/list.go index 9b4ff3c..0bb6db9 100644 --- a/cmd/remote/list.go +++ b/cmd/remote/list.go @@ -4,9 +4,9 @@ import ( "log" "os" - "git.cryptic.systems/fh-trier/go-flucky/pkg/cli" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/cli" + "github.com/volker-raschek/flucky/pkg/config" ) var quiet bool diff --git a/cmd/remote/remove.go b/cmd/remote/remove.go index 06948a0..9d88cdf 100644 --- a/cmd/remote/remove.go +++ b/cmd/remote/remove.go @@ -3,8 +3,8 @@ package remote import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var rmRemoteCmd = &cobra.Command{ diff --git a/cmd/remote/rename.go b/cmd/remote/rename.go index fc44916..d8351f4 100644 --- a/cmd/remote/rename.go +++ b/cmd/remote/rename.go @@ -3,8 +3,8 @@ package remote import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var renameRemoteCmd = &cobra.Command{ diff --git a/cmd/sensor/add.go b/cmd/sensor/add.go index 5371ed4..cdadd8f 100644 --- a/cmd/sensor/add.go +++ b/cmd/sensor/add.go @@ -4,9 +4,9 @@ import ( "fmt" "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" - "git.cryptic.systems/fh-trier/go-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 a2bc326..30d9a40 100644 --- a/cmd/sensor/disable.go +++ b/cmd/sensor/disable.go @@ -3,8 +3,8 @@ package sensor import ( "log" - "git.cryptic.systems/fh-trier/go-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 53897c8..012df0b 100644 --- a/cmd/sensor/enable.go +++ b/cmd/sensor/enable.go @@ -3,8 +3,8 @@ package sensor import ( "log" - "git.cryptic.systems/fh-trier/go-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 a362e96..3aa9132 100644 --- a/cmd/sensor/list.go +++ b/cmd/sensor/list.go @@ -4,9 +4,9 @@ import ( "log" "os" - "git.cryptic.systems/fh-trier/go-flucky/pkg/cli" - "git.cryptic.systems/fh-trier/go-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/rename.go b/cmd/sensor/rename.go index d60a869..7d6b034 100644 --- a/cmd/sensor/rename.go +++ b/cmd/sensor/rename.go @@ -4,8 +4,8 @@ import ( "fmt" "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var renameSensorCmd = &cobra.Command{ diff --git a/cmd/sensor/rm.go b/cmd/sensor/rm.go index b874b29..2b8dd18 100644 --- a/cmd/sensor/rm.go +++ b/cmd/sensor/rm.go @@ -3,8 +3,8 @@ package sensor import ( "log" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/config" ) var rmSensorCmd = &cobra.Command{ diff --git a/cmd/temperature/log.go b/cmd/temperature/log.go index 852f681..34b6a70 100644 --- a/cmd/temperature/log.go +++ b/cmd/temperature/log.go @@ -5,9 +5,9 @@ import ( "log" "os" - "git.cryptic.systems/fh-trier/go-flucky/pkg/cli" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" "github.com/spf13/cobra" + "github.com/volker-raschek/flucky/pkg/cli" + "github.com/volker-raschek/flucky/pkg/config" ) var logTemperatureCmd = &cobra.Command{ diff --git a/cmd/temperature/read.go b/cmd/temperature/read.go index dddbf5e..c8587af 100644 --- a/cmd/temperature/read.go +++ b/cmd/temperature/read.go @@ -5,10 +5,10 @@ import ( "log" "os" - "git.cryptic.systems/fh-trier/go-flucky/pkg/cli" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" - "git.cryptic.systems/fh-trier/go-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/sensor" ) var logs bool diff --git a/go.mod b/go.mod index 78fd31b..257ca1e 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,6 @@ module github.com/volker-raschek/flucky go 1.12 require ( - git.cryptic.systems/fh-trier/go-flucky v0.0.0-20181207215028-500d1a5823bf - git.cryptic.systems/fh-trier/go-flucky-server v0.0.0-20181230151231-f6edecea614d // indirect github.com/MichaelS11/go-dht v0.0.0-20181004212404-be44b9ee7fec github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/kr/pretty v0.1.0 // indirect diff --git a/go.sum b/go.sum index 3fa3ea7..4baebcf 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,11 @@ -git.cryptic.systems/fh-trier/go-flucky v0.0.0-20181207215028-500d1a5823bf h1:WM8TvicHgWrAn+CN0z5u2lkX0L4ejtK+rUckoucNad8= -git.cryptic.systems/fh-trier/go-flucky v0.0.0-20181207215028-500d1a5823bf/go.mod h1:yb5tRWqyFQ3CSgzOWTrvedu7QvpB+Z33+5xBR53ApHA= -git.cryptic.systems/fh-trier/go-flucky-server v0.0.0-20181230151231-f6edecea614d h1:F6PfcsO3KTND6nS+W1JIyQTZP0ELkpO4ZtsJLM1AkJk= -git.cryptic.systems/fh-trier/go-flucky-server v0.0.0-20181230151231-f6edecea614d/go.mod h1:WsdKW/cKXJboXNZduOxhD6y7NyhYN5E8eH6Jj5nDNNE= 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/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= @@ -16,6 +15,7 @@ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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= +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 c13e7b0..f114fd7 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "os" "os/user" - "git.cryptic.systems/fh-trier/go-flucky/cmd" + "github.com/volker-raschek/flucky/cmd" ) var version string diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 2e23b81..a259386 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -5,12 +5,12 @@ import ( "io" "text/tabwriter" - "git.cryptic.systems/fh-trier/go-flucky/pkg/logger" + "github.com/volker-raschek/flucky/pkg/logger" - "git.cryptic.systems/fh-trier/go-flucky/pkg/internal/temperature" + "github.com/volker-raschek/flucky/pkg/internal/temperature" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + "github.com/volker-raschek/flucky/pkg/config" + "github.com/volker-raschek/flucky/pkg/types" ) // PrintHumidities displays a list of humidities diff --git a/pkg/config/fluckyconfig.go b/pkg/config/fluckyconfig.go index d1b49a4..2f9d1da 100644 --- a/pkg/config/fluckyconfig.go +++ b/pkg/config/fluckyconfig.go @@ -7,12 +7,12 @@ import ( "io" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/logger" + "github.com/volker-raschek/flucky/pkg/logger" - "git.cryptic.systems/fh-trier/go-flucky/pkg/sensor" + "github.com/volker-raschek/flucky/pkg/sensor" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" uuid "github.com/satori/go.uuid" + "github.com/volker-raschek/flucky/pkg/types" ) // FluckyConfig dasd diff --git a/pkg/config/remote.go b/pkg/config/remote.go index c443dc6..20e051b 100644 --- a/pkg/config/remote.go +++ b/pkg/config/remote.go @@ -1,6 +1,6 @@ package config -import "git.cryptic.systems/fh-trier/go-flucky/pkg/types" +import "github.com/volker-raschek/flucky/pkg/types" // Remote ... type Remote struct { diff --git a/pkg/internal/temperature/temperature.go b/pkg/internal/temperature/temperature.go index 0129289..dee7305 100644 --- a/pkg/internal/temperature/temperature.go +++ b/pkg/internal/temperature/temperature.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/config" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + "github.com/volker-raschek/flucky/pkg/config" + "github.com/volker-raschek/flucky/pkg/types" ) // GetSensorsByTemperatures returns commulated list of sensors by temperature values diff --git a/pkg/logger/file_logger.go b/pkg/logger/file_logger.go index 42c2dbd..67ac89a 100644 --- a/pkg/logger/file_logger.go +++ b/pkg/logger/file_logger.go @@ -7,7 +7,7 @@ import ( "os" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + "github.com/volker-raschek/flucky/pkg/types" ) type FileLogger struct { diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go index 97bb889..7f2b274 100644 --- a/pkg/logger/logger.go +++ b/pkg/logger/logger.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + "github.com/volker-raschek/flucky/pkg/types" ) type Logger interface { diff --git a/pkg/sensor/dht11.go b/pkg/sensor/dht11.go index a5decf0..18f92c5 100644 --- a/pkg/sensor/dht11.go +++ b/pkg/sensor/dht11.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" "github.com/MichaelS11/go-dht" uuid "github.com/satori/go.uuid" + "github.com/volker-raschek/flucky/pkg/types" ) type DHT11Sensor struct { diff --git a/pkg/sensor/dht22.go b/pkg/sensor/dht22.go index 7343250..fa30777 100644 --- a/pkg/sensor/dht22.go +++ b/pkg/sensor/dht22.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" "github.com/MichaelS11/go-dht" uuid "github.com/satori/go.uuid" + "github.com/volker-raschek/flucky/pkg/types" ) type DHT22Sensor struct { diff --git a/pkg/sensor/ds18b20.go b/pkg/sensor/ds18b20.go index 30a865e..2a01ae9 100644 --- a/pkg/sensor/ds18b20.go +++ b/pkg/sensor/ds18b20.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "git.cryptic.systems/fh-trier/go-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/sensor.go b/pkg/sensor/sensor.go index cae837f..786a760 100644 --- a/pkg/sensor/sensor.go +++ b/pkg/sensor/sensor.go @@ -3,9 +3,9 @@ package sensor import ( "sync" - "git.cryptic.systems/fh-trier/go-flucky/pkg/internal/errutils" + "github.com/volker-raschek/flucky/pkg/internal/errutils" - "git.cryptic.systems/fh-trier/go-flucky/pkg/types" + "github.com/volker-raschek/flucky/pkg/types" ) type HumiditySensor interface {