Skip to content
Snippets Groups Projects
Commit a23e0165 authored by ale's avatar ale
Browse files

go vet fixes

parent a886d480
No related branches found
No related tags found
No related merge requests found
...@@ -314,7 +314,7 @@ func init() { ...@@ -314,7 +314,7 @@ func init() {
func usage() { func usage() {
fmt.Fprintf(os.Stderr, "Usage: %s\n\nGlobal options:\n", cmdr.UsageLine) fmt.Fprintf(os.Stderr, "Usage: %s\n\nGlobal options:\n", cmdr.UsageLine)
flag.PrintDefaults() flag.PrintDefaults()
fmt.Fprintln(os.Stderr, "\nType \"radioctl help\" for more documentation.\n") fmt.Fprintf(os.Stderr, "\nType \"radioctl help\" for more documentation.\n\n")
} }
func main() { func main() {
......
...@@ -39,7 +39,7 @@ func (wlp weightedListenersPolicy) GetNode(nodes []*autoradio.NodeStatus) *autor ...@@ -39,7 +39,7 @@ func (wlp weightedListenersPolicy) GetNode(nodes []*autoradio.NodeStatus) *autor
weightBase := 1000000 weightBase := 1000000
for _, n := range nodes { for _, n := range nodes {
w := weightBase / (n.NumListeners() + 1) w := weightBase / (n.NumListeners() + 1)
choices = append(choices, randutil.Choice{w, n}) choices = append(choices, randutil.Choice{Weight: w, Item: n})
} }
result, err := randutil.WeightedChoice(choices) result, err := randutil.WeightedChoice(choices)
if err != nil { if err != nil {
......
...@@ -24,7 +24,7 @@ var ( ...@@ -24,7 +24,7 @@ var (
func init() { func init() {
hostname, err := os.Hostname() hostname, err := os.Hostname()
if err != nil { if err != nil {
log.Fatal("Could not determine hostname: %v", err) log.Fatalf("Could not determine hostname: %v", err)
} }
prefix = fmt.Sprintf("autoradio.%s.", hostname) prefix = fmt.Sprintf("autoradio.%s.", hostname)
} }
...@@ -33,7 +33,7 @@ func getClient() *statsd.Client { ...@@ -33,7 +33,7 @@ func getClient() *statsd.Client {
clientInit.Do(func() { clientInit.Do(func() {
c, err := statsd.New(*statsdServer, prefix) c, err := statsd.New(*statsdServer, prefix)
if err != nil { if err != nil {
log.Fatal("Error initializing instrumentation: %v", err) log.Fatalf("Error initializing instrumentation: %v", err)
} }
client = c client = c
}) })
......
...@@ -151,7 +151,7 @@ func newIcecastConfig(publicIp string) *icecastConfig { ...@@ -151,7 +151,7 @@ func newIcecastConfig(publicIp string) *icecastConfig {
adminPw := getIcecastAdminPassword() adminPw := getIcecastAdminPassword()
return &icecastConfig{ return &icecastConfig{
XMLName: xml.Name{"", "icecast"}, XMLName: xml.Name{Local: "icecast"},
Limits: iceLimitsConfig{ Limits: iceLimitsConfig{
Clients: maxClients, Clients: maxClients,
Sources: maxClients / 2, Sources: maxClients / 2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment