Skip to content

Commit 07cc20d

Browse files
authored
chore: remove unused code and enable extra linters (#5369)
1 parent 80d6086 commit 07cc20d

File tree

4 files changed

+2
-22
lines changed

4 files changed

+2
-22
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ linters:
2323
- promlinter
2424
- thelper
2525
- unconvert
26+
- unused
2627
settings:
2728
goheader:
2829
values:

pkg/manifest/mantaray/marshal.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ func (bb *bitsForBytes) set(b byte) {
190190
bb.bits[b/8] |= 1 << (b % 8)
191191
}
192192

193-
//nolint:unused
194-
func (bb *bitsForBytes) get(b byte) bool {
195-
return bb.getUint8(b)
196-
}
197-
198193
func (bb *bitsForBytes) getUint8(i uint8) bool {
199194
return (bb.bits[i/8]>>(i%8))&1 > 0
200195
}

pkg/manifest/mantaray/node.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,25 +105,10 @@ func (n *Node) makeWithMetadata() {
105105
n.nodeType = n.nodeType | nodeTypeWithMetadata
106106
}
107107

108-
//nolint:unused
109-
func (n *Node) makeNotValue() {
110-
n.nodeType = (nodeTypeMask ^ nodeTypeValue) & n.nodeType
111-
}
112-
113-
//nolint:unused
114-
func (n *Node) makeNotEdge() {
115-
n.nodeType = (nodeTypeMask ^ nodeTypeEdge) & n.nodeType
116-
}
117-
118108
func (n *Node) makeNotWithPathSeparator() {
119109
n.nodeType = (nodeTypeMask ^ nodeTypeWithPathSeparator) & n.nodeType
120110
}
121111

122-
//nolint:unused
123-
func (n *Node) makeNotWithMetadata() {
124-
n.nodeType = (nodeTypeMask ^ nodeTypeWithMetadata) & n.nodeType
125-
}
126-
127112
func (n *Node) SetObfuscationKey(obfuscationKey []byte) {
128113
bytes := make([]byte, 32)
129114
copy(bytes, obfuscationKey)

pkg/pusher/pusher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ type Service struct {
6363
}
6464

6565
const (
66-
traceDuration = 30 * time.Second // duration for every root tracing span
67-
ConcurrentPushes = swarm.Branches // how many chunks to push simultaneously
66+
ConcurrentPushes = swarm.Branches // how many chunks to push simultaneously
6867
DefaultRetryCount = 6
6968
)
7069

0 commit comments

Comments
 (0)