Skip to content

Commit 760a528

Browse files
committed
moved nolint hints
1 parent cfa00f3 commit 760a528

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

internal/conn/conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ func (c *conn) setState(ctx context.Context, s State) State {
161161
func (c *conn) Unban(ctx context.Context) State {
162162
var newState State
163163
c.mtx.RLock()
164-
cc := c.grpcConn
164+
cc := c.grpcConn //nolint:ifshort
165165
c.mtx.RUnlock()
166-
if isAvailable(cc) { //nolint:ifshort
166+
if isAvailable(cc) {
167167
newState = Online
168168
} else {
169169
newState = Offline

internal/decimal/decimal.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ func FromBytes(bts []byte, precision, scale uint32) *big.Int { //nolint:ifshort
6161
}
6262

6363
v.SetBytes(bts)
64-
neg := bts[0]&negMask != 0
65-
if neg { //nolint:ifshort
64+
neg := bts[0]&negMask != 0 //nolint:ifshort
65+
if neg {
6666
// Given bytes contains negative value.
6767
// Interpret is as two's complement.
6868
not(v)
@@ -98,8 +98,8 @@ func Parse(s string, precision, scale uint32) (*big.Int, error) { //nolint:ifsho
9898
return v, nil
9999
}
100100

101-
neg := s[0] == '-'
102-
if neg || s[0] == '+' { //nolint:ifshort
101+
neg := s[0] == '-' //nolint:ifshort
102+
if neg || s[0] == '+' {
103103
s = s[1:]
104104
}
105105
if isInf(s) {
@@ -211,8 +211,8 @@ func Format(x *big.Int, precision, scale uint32) string {
211211
}
212212

213213
v := big.NewInt(0).Set(x)
214-
neg := x.Sign() < 0
215-
if neg { //nolint:ifshort
214+
neg := x.Sign() < 0 //nolint:ifshort
215+
if neg {
216216
// Convert negative to positive.
217217
v.Neg(x)
218218
}
@@ -287,8 +287,8 @@ func BigIntToByte(x *big.Int, precision, scale uint32) (p [16]byte) {
287287
}
288288

289289
func put(x *big.Int, p []byte) {
290-
neg := x.Sign() < 0
291-
if neg { //nolint:ifshort
290+
neg := x.Sign() < 0 //nolint:ifshort
291+
if neg {
292292
x = complement(x)
293293
}
294294
i := len(p)

internal/topic/topicwriterinternal/writer_reconnector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,10 @@ func (w *WriterReconnector) Close(ctx context.Context) error {
331331
reason := xerrors.WithStackTrace(errStopWriterReconnector)
332332
w.queue.StopAddNewMessages(reason)
333333

334-
flushErr := w.Flush(ctx)
334+
flushErr := w.Flush(ctx) //nolint:ifshort
335335
closeErr := w.close(ctx, reason)
336336

337-
if flushErr != nil { //nolint:ifshort
337+
if flushErr != nil {
338338
return flushErr
339339
}
340340

0 commit comments

Comments
 (0)