Skip to content

Commit

Permalink
Merge pull request #75 from sarangak/go_modules
Browse files Browse the repository at this point in the history
Use Go modules
  • Loading branch information
stefanwichmann committed May 4, 2020
2 parents c6afba4 + d31df17 commit a875e5a
Show file tree
Hide file tree
Showing 17 changed files with 98 additions and 17 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,13 @@ In order to decide if Kelvin suits your needs and works in your setup, it helps
3. ***The light is turned off:*** Kelvin will clear the last known state and do nothing.

# Development & Participation
If you want to tinker with Kelvin and it's inner workings, feel free to do so. To get started you can simple clone the main repository into your `GOPATH` by executing the following commands:
If you want to tinker with Kelvin and it's inner workings, feel free to do so. Kelvin uses the Go Modules support built into Go 1.11. To get started you can simply clone the main repository outside of `GOPATH` by executing the following commands (feel free to change `src` to the directory of your choice):
```
cd $GOPATH
go get -v github.com/stefanwichmann/kelvin
mkdir $HOME/src
cd $HOME/src
git clone https://github.com/stefanwichmann/kelvin.git
cd kelvin
go build
```
Make sure you have set up your [go](https://www.golang.org) development environment by following the steps in the official [documentation](https://golang.org/doc/).

Expand Down
2 changes: 1 addition & 1 deletion archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"archive/zip"
"compress/gzip"
"errors"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"io"
"io/ioutil"
"os"
Expand Down
2 changes: 1 addition & 1 deletion bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"strings"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
hue "github.com/stefanwichmann/go.hue"
)

Expand Down
2 changes: 1 addition & 1 deletion configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"os"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/ghodss/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion configuration_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package main

import "time"
import "fmt"
import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"

func (configuration *Configuration) migrateToLatestVersion() {
log.Debugf("⚙ Migrating configuration to latest version...")
Expand Down
18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/sarangak/kelvin

go 1.14

require (
github.com/Masterminds/semver v1.5.0
github.com/bt51/ntpclient v0.0.0-20140310165113-3045f71e2530
github.com/btittelbach/astrotime v0.0.0-20160515101311-7ddba43aa26e
github.com/ghodss/yaml v1.0.0
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.4
github.com/onsi/ginkgo v1.12.0 // indirect
github.com/onsi/gomega v1.9.0 // indirect
github.com/sirupsen/logrus v1.5.0
github.com/stefanwichmann/go.hue v0.0.0-20191102085005-2bc19682969e
github.com/stefanwichmann/lanscan v0.0.0-20190324154315-2a77f896f93a // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
)
60 changes: 60 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/bt51/ntpclient v0.0.0-20140310165113-3045f71e2530 h1:2W1J2qL8feh1Av0KJq5cbBACg+lx6DfIm18vt45P+DA=
github.com/bt51/ntpclient v0.0.0-20140310165113-3045f71e2530/go.mod h1:OahuhAz81f/KxpjyyO0H3rTNypHk3qd9s8BWriP7DAI=
github.com/btittelbach/astrotime v0.0.0-20160515101311-7ddba43aa26e h1:yPRY9/vyatroUweN7ntWNO1JMJyIdyx+JnBOobhCkRI=
github.com/btittelbach/astrotime v0.0.0-20160515101311-7ddba43aa26e/go.mod h1:jNKwDmwLM4+wENDkph85EVnlfuZ3o+MBtzFD8AiQK48=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg=
github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU=
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q=
github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
github.com/stefanwichmann/go.hue v0.0.0-20191102085005-2bc19682969e h1:dlt0K5l0/b5aKYcvcZQxS9eKB/oULfIgIPsMqvg4bUY=
github.com/stefanwichmann/go.hue v0.0.0-20191102085005-2bc19682969e/go.mod h1:zZj/cmketnAGzBubTUuPi9mZPC6dyzbJMIWeQTtAx68=
github.com/stefanwichmann/lanscan v0.0.0-20190324154315-2a77f896f93a h1:euRDD9Q8H1dItIr67JeUlPNJjTpXNqAuR7i3ujA2ELI=
github.com/stefanwichmann/lanscan v0.0.0-20190324154315-2a77f896f93a/go.mod h1:O59XMDOTv29FsoW1Rnm/nj3W0hZyJOMaHR/bQvCOBjs=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion huelight.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strconv"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
hue "github.com/stefanwichmann/go.hue"
)

Expand Down
2 changes: 1 addition & 1 deletion interval.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package main

import "time"
import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"

// Interval represents a time range of one day with
// the given start and end configurations.
Expand Down
2 changes: 1 addition & 1 deletion kelvin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"syscall"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

var applicationVersion = "development"
Expand Down
2 changes: 1 addition & 1 deletion light.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package main
import (
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
hue "github.com/stefanwichmann/go.hue"
)

Expand Down
2 changes: 1 addition & 1 deletion lightstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
package main

import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"

// LightState represents a light configuration.
// It can be read from or written to the physical lights.
Expand Down
2 changes: 1 addition & 1 deletion location.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/btittelbach/astrotime"
)

Expand Down
2 changes: 1 addition & 1 deletion scenes.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
package main

import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"
import hue "github.com/stefanwichmann/go.hue"
import "time"
import "strings"
Expand Down
2 changes: 1 addition & 1 deletion schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"fmt"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// Schedule represents all relevants timestamps of one day.
Expand Down
2 changes: 1 addition & 1 deletion upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
package main

import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"
import "runtime"
import "path/filepath"
import "github.com/Masterminds/semver"
Expand Down
2 changes: 1 addition & 1 deletion webinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
package main

import log "github.com/Sirupsen/logrus"
import log "github.com/sirupsen/logrus"
import "net/http"
import "html/template"
import "github.com/gorilla/mux"
Expand Down

0 comments on commit a875e5a

Please sign in to comment.