Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoradio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
autoradio
Commits
a23e0165
Commit
a23e0165
authored
10 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
go vet fixes
parent
a886d480
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmd/radioctl/radioctl.go
+1
-1
1 addition, 1 deletion
cmd/radioctl/radioctl.go
fe/loadbalancing.go
+1
-1
1 addition, 1 deletion
fe/loadbalancing.go
instrumentation/stats.go
+2
-2
2 additions, 2 deletions
instrumentation/stats.go
node/icecast_config.go
+1
-1
1 addition, 1 deletion
node/icecast_config.go
with
5 additions
and
5 deletions
cmd/radioctl/radioctl.go
+
1
−
1
View file @
a23e0165
...
@@ -314,7 +314,7 @@ func init() {
...
@@ -314,7 +314,7 @@ func init() {
func
usage
()
{
func
usage
()
{
fmt
.
Fprintf
(
os
.
Stderr
,
"Usage: %s
\n\n
Global options:
\n
"
,
cmdr
.
UsageLine
)
fmt
.
Fprintf
(
os
.
Stderr
,
"Usage: %s
\n\n
Global options:
\n
"
,
cmdr
.
UsageLine
)
flag
.
PrintDefaults
()
flag
.
PrintDefaults
()
fmt
.
Fprint
ln
(
os
.
Stderr
,
"
\n
Type
\"
radioctl help
\"
for more documentation.
\n
"
)
fmt
.
Fprint
f
(
os
.
Stderr
,
"
\n
Type
\"
radioctl help
\"
for more documentation.
\n
\n
"
)
}
}
func
main
()
{
func
main
()
{
...
...
This diff is collapsed.
Click to expand it.
fe/loadbalancing.go
+
1
−
1
View file @
a23e0165
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
instrumentation/stats.go
+
2
−
2
View file @
a23e0165
...
@@ -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
.
Fatal
f
(
"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
.
Fatal
f
(
"Error initializing instrumentation: %v"
,
err
)
}
}
client
=
c
client
=
c
})
})
...
...
This diff is collapsed.
Click to expand it.
node/icecast_config.go
+
1
−
1
View file @
a23e0165
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment