Skip to content

Commit

Permalink
govet and gofmt fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martensson committed Jul 12, 2017
1 parent cac0a4d commit 45c3968
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions marathon.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/Sirupsen/logrus"
)

// Struct for our apps nested with tasks.
// MarathonApps struct for our apps nested with tasks.
type MarathonApps struct {
Apps []struct {
Id string `json:"id"`
Expand Down Expand Up @@ -56,7 +56,7 @@ func eventStream() {
Transport: tr,
}
ticker := time.NewTicker(1 * time.Second)
for _ = range ticker.C {
for range ticker.C {
var endpoint string
for _, es := range health.Endpoints {
if es.Healthy == true {
Expand Down Expand Up @@ -369,7 +369,7 @@ func writeConf() error {
tmpFile, err := ioutil.TempFile(parent, ".nginx.conf.tmp-")
defer tmpFile.Close()
lastConfig = tmpFile.Name()
err = template.Execute(tmpFile, config)
err = template.Execute(tmpFile, &config)
if err != nil {
return err
}
Expand All @@ -393,7 +393,7 @@ func checkTmpl() error {
if err != nil {
return err
}
err = t.Execute(ioutil.Discard, config)
err = t.Execute(ioutil.Discard, &config)
if err != nil {
return err
}
Expand All @@ -420,7 +420,7 @@ func checkConf(path string) error {
// This is to allow arguments as well. Example "docker exec nginx..."
args := strings.Fields(config.Nginx_cmd)
head := args[0]
args = args[1:len(args)]
args = args[1:]
args = append(args, "-c")
args = append(args, path)
args = append(args, "-t")
Expand All @@ -441,7 +441,7 @@ func reloadNginx() error {
// This is to allow arguments as well. Example "docker exec nginx..."
args := strings.Fields(config.Nginx_cmd)
head := args[0]
args = args[1:len(args)]
args = args[1:]
args = append(args, "-s")
args = append(args, "reload")
cmd := exec.Command(head, args...)
Expand Down
2 changes: 1 addition & 1 deletion nixy.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func nixy_health(w http.ResponseWriter, r *http.Request) {

func nixy_config(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Type", "application/json; charset=utf-8")
b, _ := json.MarshalIndent(config, "", " ")
b, _ := json.MarshalIndent(&config, "", " ")
w.Write(b)
return
}
Expand Down

0 comments on commit 45c3968

Please sign in to comment.