Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 1380fea

Browse files
Paul NasratSolomon Hykes
authored andcommitted
Fix go vet warnings.
Mostly unreachable code, one format string issue. Signed-off-by: Paul Nasrat <pnasrat@google.com> (github: pnasrat)
1 parent a1bbd31 commit 1380fea

4 files changed

Lines changed: 1 addition & 8 deletions

File tree

copy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ func Copy(dst Sender, src Receiver) (int, error) {
3434
}
3535
n++
3636
}
37-
return n, nil
3837
}

data/message.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func (m Message) Set(k string, v ...string) Message {
4444
data, err := Decode(string(m))
4545
if err != nil {
4646
panic(err)
47-
return m
4847
}
4948
data[k] = v
5049
return Message(Encode(data))
@@ -54,7 +53,6 @@ func (m Message) Del(k string) Message {
5453
data, err := Decode(string(m))
5554
if err != nil {
5655
panic(err)
57-
return m
5856
}
5957
delete(data, k)
6058
return Message(Encode(data))

unix/libchan.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ func ReceiveConn(src Receiver) ([]byte, *UnixConn, error) {
113113
}
114114
return data, conn, nil
115115
}
116-
panic("impossibru!")
117-
return nil, nil, nil
118116
}
119117

120118
func Copy(dst Sender, src Receiver) (int, error) {
@@ -134,8 +132,6 @@ func Copy(dst Sender, src Receiver) (int, error) {
134132
}
135133
n++
136134
}
137-
panic("impossibru!")
138-
return n, nil
139135
}
140136

141137
// MsgDesc returns a human readable description of a libchan message, usually

utils/stack_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func TestStackAddBad(t *testing.T) {
110110
t.Fatal(err)
111111
}
112112
if s.Len() != 1 {
113-
t.Fatalf("%#v")
113+
t.Fatalf("%#v", s)
114114
}
115115
if len(buf) != 1 {
116116
t.Fatalf("%#v", buf)

0 commit comments

Comments
 (0)