tiltwind commented on PR #381:
URL: 
https://github.com/apache/dubbo-go-hessian2/pull/381#issuecomment-3209735418

   fixed some lint error:
   ```
   codec.go:206:7: S1039: unnecessary use of fmt.Sprintf (staticcheck)
           rs = fmt.Sprintf("[]byte{")
                ^
   codec.go:211:8: S1039: unnecessary use of fmt.Sprintf (staticcheck)
           rs += fmt.Sprintf("}\n")
                 ^
   date.go:40:5: QF1009: probably want to use time.Time.Equal instead 
(staticcheck)
           if vi == ZeroDate {
              ^
   date.go:76:2: QF1002: could use tagged switch on tag (staticcheck)
           switch {
           ^
   decode.go:298:55: SA4003: every value of type byte is <= math.MaxUint8 
(staticcheck)
           case (tag >= 0xd8 && tag <= 0xef) || (tag >= 0xf0 && tag <= 0xff) ||
                                                                ^
   double_test.go:107:6: QF1011: could omit type float64 from declaration; it 
will be inferred from the right-hand side (staticcheck)
                   f1 float64 = 1024.1024102410241024
                      ^
   encode.go:140:6: QF1009: probably want to use time.Time.Equal instead 
(staticcheck)
                   if ZeroDate == val {
                      ^
   encode.go:186:5: S1021: should merge variable declaration with assignment on 
next line (staticcheck)
                                   var clazz string
                                   ^
   int_test.go:159:7: QF1011: could omit type int from declaration; it will be 
inferred from the right-hand side (staticcheck)
                   i0  int      = 0
                       ^
   java_util/locale.go:84:49: S1019: should use make([]Locale, 22) instead 
(staticcheck)
           locales   []Locale            = make([]Locale, 22, 22)
                                                          ^
   list.go:89:12: QF1004: could use strings.ReplaceAll instead (staticcheck)
                   goType = strings.Replace(goType, "[]", "", -1)
                            ^
   list.go:371:51: S1019: should use make([]interface{}, length) instead 
(staticcheck)
                           aryValue = reflect.ValueOf(make([]interface{}, 
length, length))
                                                                          ^
   long.go:127:22: SA4003: every value of type byte is <= math.MaxUint8 
(staticcheck)
           case tag >= 0xf0 && tag <= 0xff:
                               ^
   map.go:261:2: QF1002: could use tagged switch on tag (staticcheck)
           switch {
           ^
   object_test.go:1038:20: QF1011: could omit type bool from declaration; it 
will be inferred from the right-hand side (staticcheck)
           var bl1, bl2, bl3 bool = true, false, true
                             ^
   object_test.go:1052:20: QF1011: could omit type float64 from declaration; it 
will be inferred from the right-hand side (staticcheck)
           var fl1, fl2, fl3 float64 = 1.0, 100.0, 10000.1
                             ^
   ref.go:178:2: QF1002: could use tagged switch on tag (staticcheck)
           switch {
           ^
   string.go:118:3: QF1006: could lift into loop condition (staticcheck)
                   if vBuf.Len() <= 0 {
                   ^
   string.go:228:51: SA4003: every value of type byte is <= math.MaxUint8 
(staticcheck)
                   (tag >= 0xd8 && tag <= 0xef) || (tag >= 0xf0 && tag <= 0xff) 
||
                                                                   ^
   testcases/user/user_test.go:34:2: S1021: should merge variable declaration 
with assignment on next line (staticcheck)
           var g interface{}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to