Skip to content

Commit cfa00f3

Browse files
committed
moved nolint hints
1 parent e670134 commit cfa00f3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

internal/conn/conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ func (c *conn) setState(ctx context.Context, s State) State {
158158
return s
159159
}
160160

161-
func (c *conn) Unban(ctx context.Context) State { //nolint:ifshort
161+
func (c *conn) Unban(ctx context.Context) State {
162162
var newState State
163163
c.mtx.RLock()
164164
cc := c.grpcConn
165165
c.mtx.RUnlock()
166-
if isAvailable(cc) {
166+
if isAvailable(cc) { //nolint:ifshort
167167
newState = Online
168168
} else {
169169
newState = Offline

internal/decimal/decimal.go

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

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

101101
neg := s[0] == '-'
102-
if neg || s[0] == '+' {
102+
if neg || s[0] == '+' { //nolint:ifshort
103103
s = s[1:]
104104
}
105105
if isInf(s) {
@@ -190,7 +190,7 @@ func Parse(s string, precision, scale uint32) (*big.Int, error) { //nolint:ifsho
190190

191191
// Format returns the string representation of x with the given precision and
192192
// scale.
193-
func Format(x *big.Int, precision, scale uint32) string { //nolint:ifshort
193+
func Format(x *big.Int, precision, scale uint32) string {
194194
switch {
195195
case x.CmpAbs(inf) == 0:
196196
if x.Sign() < 0 {
@@ -212,7 +212,7 @@ func Format(x *big.Int, precision, scale uint32) string { //nolint:ifshort
212212

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

289-
func put(x *big.Int, p []byte) { //nolint:ifshort
289+
func put(x *big.Int, p []byte) {
290290
neg := x.Sign() < 0
291-
if neg {
291+
if neg { //nolint:ifshort
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
@@ -327,14 +327,14 @@ func (w *WriterReconnector) Flush(ctx context.Context) error {
327327
return w.queue.WaitLastWritten(ctx)
328328
}
329329

330-
func (w *WriterReconnector) Close(ctx context.Context) error { //nolint:ifshort
330+
func (w *WriterReconnector) Close(ctx context.Context) error {
331331
reason := xerrors.WithStackTrace(errStopWriterReconnector)
332332
w.queue.StopAddNewMessages(reason)
333333

334334
flushErr := w.Flush(ctx)
335335
closeErr := w.close(ctx, reason)
336336

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

0 commit comments

Comments
 (0)