Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Oct 12, 2020
1 parent bda8ba7 commit 8fd7339
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"os"
"text/template"
"time"

"github.com/docker/docker/client"
)
Expand All @@ -14,9 +15,9 @@ var cli *client.Client
var apiKey string
var hassioNetwork *net.IPNet
var indexTemplate *template.Template
var staticFiles *http.Handler
var wwwRoot string
var development bool
var httpClient http.Client

func main() {
var err error
Expand All @@ -29,6 +30,7 @@ func main() {
apiKey = os.Getenv("SUPERVISOR_TOKEN")
_, hassioNetwork, _ = net.ParseCIDR("172.30.32.0/23")
development = (os.Getenv("DEVELOPMENT") == "True")
httpClient = http.Client{Timeout: 3 * time.Second} //nolint

if development {
wwwRoot = "./rootfs/usr/share/www/"
Expand Down
5 changes: 0 additions & 5 deletions supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ import (
"context"
"io"
"log"
"net/http"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
)

func supervisorPing() bool {
httpClient := http.Client{
Timeout: 3 * time.Second,
}
response, err := httpClient.Get("http://supervisor/supervisor/ping")
if err != nil {
log.Printf("Supervisor ping failed with error %s", err)
Expand Down

0 comments on commit 8fd7339

Please sign in to comment.