Skip to content

Commit f95db09

Browse files
committed
Add automatic fixes from golangci-lint
1 parent 5033c7f commit f95db09

File tree

4 files changed

+0
-7
lines changed

4 files changed

+0
-7
lines changed

main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ func main() {
2121

2222
http.HandleFunc("/", handler)
2323
err := http.ListenAndServe(addr, nil)
24-
2524
if err != nil {
2625
fmt.Print(err)
2726
}
@@ -65,7 +64,6 @@ func getAddr() string {
6564
// itself is healthy.
6665
func doHealthcheck() {
6766
_, err := State()
68-
6967
if err != nil {
7068
os.Exit(1)
7169
}

state.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ func (s *SystemdState) IsRunning() bool {
2222
// State returns the systemd state.
2323
func State() (SystemdState, error) {
2424
conn, err := dbus.NewSystemdConnection()
25-
2625
if err != nil {
2726
return SystemdState{}, err
2827
}
2928

3029
defer conn.Close()
3130

3231
p, err := conn.SystemState()
33-
3432
if err != nil {
3533
return SystemdState{}, err
3634
}

state_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ func makeState(s string) SystemdState {
1313
}
1414

1515
func TestStateIsRunning(t *testing.T) {
16-
1716
running := makeState("running")
1817

1918
if !running.IsRunning() {
@@ -62,7 +61,6 @@ func TestStateString(t *testing.T) {
6261

6362
func TestGetState(t *testing.T) {
6463
_, err := State()
65-
6664
if err != nil {
6765
t.Skipf("Could not get state: %v", err)
6866
}

statusformat_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ func TestStatusFormatError(t *testing.T) {
4747
if errorStateFormat.State != "some error" {
4848
t.Errorf("Expected \"%s\"", errorStateFormat.State)
4949
}
50-
5150
}

0 commit comments

Comments
 (0)