Linter issue
Closed this issue · 0 comments
nabbar commented
ioutils/fileProgess.go:344:7: comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if er != io.EOF {
^
ioutils/fileProgess.go:385:7: comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if er != io.EOF {
^
ioutils/fileProgess.go:435:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err == io.EOF {
^
ioutils/fileProgess.go:451:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err == io.EOF {
^
ioutils/fileProgess.go:468:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err == io.EOF {
^
ioutils/fileProgess.go:484:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err == io.EOF {
^
ioutils/fileProgess.go:500:19: comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err != io.EOF {
^
ioutils/fileProgess.go:516:19: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if err != nil && err == io.EOF {
^
archive/tar/reader.go:51:18: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if e != nil && e == io.EOF {
^
archive/tar/reader.go:87:18: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
if e != nil && e == io.EOF {
^
aws/helper/interface.go:61:15: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
if n, ok := e.(liberr.Error); ok {
^
aws/configAws/models.go:56:14: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
if e, ok := err.(*libval.InvalidValidationError); ok {
^
aws/configAws/models.go:62:20: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
for _, e := range err.(libval.ValidationErrors) {
^
aws/configCustom/models.go:63:15: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
if e, ok := err.(*libval.InvalidValidationError); ok {
^
aws/configCustom/models.go:69:21: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
for _, e := range err.(libval.ValidationErrors) {
^
ldap/model.go:114:14: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
if e, ok := err.(*validator.InvalidValidationError); ok {
^
ldap/model.go:120:20: type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors (errorlint)
for _, e := range err.(validator.ValidationErrors) {
^
errors/trace.go:70:11: PC, Func, Entry are missing in Frame (exhaustivestruct)
return runtime.Frame{
^
errors/trace.go:82:9: PC, Func, Entry are missing in Frame (exhaustivestruct)
return runtime.Frame{Function: "", File: "", Line: 0}
^
logger/formatter.go:65:24: ForceQuote, DisableQuote, EnvironmentOverrideColors, FullTimestamp, TimestampFormat, SortingFunc, PadLevelText, QuoteEmptyFields, FieldMap, CallerPrettyfier are missing in TextFormatter (exhaustivestruct)
logrus.SetFormatter(&logrus.TextFormatter{
^
logger/formatter.go:75:24: TimestampFormat, DisableHTMLEscape, DataKey, FieldMap, CallerPrettyfier, PrettyPrint are missing in JSONFormatter (exhaustivestruct)
logrus.SetFormatter(&logrus.JSONFormatter{
^
logger/logger.go:154:9: PC, Func, Entry are missing in Frame (exhaustivestruct)
return runtime.Frame{Function: "unknown", File: "unknown", Line: 0}
^
aws/bucket/bucket.go:39:51: ExpectedBucketOwner is missing in HeadBucketInput (exhaustivestruct)
out, err := cli.s3.HeadBucket(cli.GetContext(), &sdksss.HeadBucketInput{
^
aws/bucket/bucket.go:54:53: ACL, CreateBucketConfiguration, GrantFullControl, GrantRead, GrantReadACP, GrantWrite, GrantWriteACP, ObjectLockEnabledForBucket are missing in CreateBucketInput (exhaustivestruct)
out, err := cli.s3.CreateBucket(cli.GetContext(), &sdksss.CreateBucketInput{
^
aws/bucket/bucket.go:68:51: ExpectedBucketOwner is missing in DeleteBucketInput (exhaustivestruct)
_, err := cli.s3.DeleteBucket(cli.GetContext(), &sdksss.DeleteBucketInput{
^
aws/bucket/bucket.go:93:58: ContentMD5, ExpectedBucketOwner, MFA are missing in PutBucketVersioningInput (exhaustivestruct)
_, err := cli.s3.PutBucketVersioning(cli.GetContext(), &sdksss.PutBucketVersioningInput{
^
aws/bucket/bucket.go:95:29: MFADelete is missing in VersioningConfiguration (exhaustivestruct)
VersioningConfiguration: &sdkstp.VersioningConfiguration{
^
aws/bucket/bucket.go:104:60: ExpectedBucketOwner is missing in GetBucketVersioningInput (exhaustivestruct)
out, err := cli.s3.GetBucketVersioning(cli.GetContext(), &sdksss.GetBucketVersioningInput{
^
aws/bucket/bucket.go:121:59: ContentMD5, ExpectedBucketOwner, Token are missing in PutBucketReplicationInput (exhaustivestruct)
_, err := cli.s3.PutBucketReplication(cli.GetContext(), &sdksss.PutBucketReplicationInput{
^
aws/bucket/bucket.go:127:20: AccessControlTranslation, Account, EncryptionConfiguration, Metrics, ReplicationTime, StorageClass are missing in Destination (exhaustivestruct)
Destination: &sdkstp.Destination{
^
aws/bucket/bucket.go:141:62: ExpectedBucketOwner is missing in DeleteBucketReplicationInput (exhaustivestruct)
_, err := cli.s3.DeleteBucketReplication(cli.GetContext(), &sdksss.DeleteBucketReplicationInput{
^
aws/group/group.go:49:51: Path is missing in CreateGroupInput (exhaustivestruct)
_, err := cli.iam.CreateGroup(cli.GetContext(), &iam.CreateGroupInput{
^
aws/group/policy.go:35:67: Marker, MaxItems, PathPrefix are missing in ListAttachedGroupPoliciesInput (exhaustivestruct)
out, err := cli.iam.ListAttachedGroupPolicies(cli.GetContext(), &iam.ListAttachedGroupPoliciesInput{
^
aws/group/user.go:35:59: Marker, MaxItems are missing in ListGroupsForUserInput (exhaustivestruct)
out, err := cli.iam.ListGroupsForUser(cli.GetContext(), &iam.ListGroupsForUserInput{
^
aws/group/user.go:53:59: Marker, MaxItems are missing in ListGroupsForUserInput (exhaustivestruct)
out, err := cli.iam.ListGroupsForUser(cli.GetContext(), &iam.ListGroupsForUserInput{
^
aws/object/multipart.go:59:61: ACL, CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentType, ExpectedBucketOwner, Expires, GrantFullControl, GrantRead, GrantReadACP, GrantWriteACP, Metadata, ObjectLockLegalHoldStatus, ObjectLockMode, ObjectLockRetainUntilDate, RequestPayer, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, SSEKMSEncryptionContext, SSEKMSKeyId, ServerSideEncryption, StorageClass, Tagging, WebsiteRedirectLocation are missing in CreateMultipartUploadInput (exhaustivestruct)
upl, err = cli.s3.CreateMultipartUpload(cli.GetContext(), &sdksss.CreateMultipartUploadInput{
^
aws/object/multipart.go:98:51: ContentMD5, ExpectedBucketOwner, RequestPayer, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5 are missing in UploadPartInput (exhaustivestruct)
prt, err = cli.s3.UploadPart(cli.GetContext(), &sdksss.UploadPartInput{
^
aws/object/multipart.go:120:63: ExpectedBucketOwner, RequestPayer are missing in CompleteMultipartUploadInput (exhaustivestruct)
prt, err = cli.s3.CompleteMultipartUpload(cli.GetContext(), &sdksss.CompleteMultipartUploadInput{
^
aws/object/multipart.go:137:59: ExpectedBucketOwner, RequestPayer are missing in AbortMultipartUploadInput (exhaustivestruct)
cnl, e := cli.s3.AbortMultipartUpload(cli.GetContext(), &sdksss.AbortMultipartUploadInput{
^
aws/object/object.go:39:8: ContinuationToken, Delimiter, EncodingType, ExpectedBucketOwner, FetchOwner, MaxKeys, Prefix, RequestPayer, StartAfter are missing in ListObjectsV2Input (exhaustivestruct)
in := sdksss.ListObjectsV2Input{
^
aws/object/object.go:59:50: ExpectedBucketOwner, IfMatch, IfModifiedSince, IfNoneMatch, IfUnmodifiedSince, PartNumber, Range, RequestPayer, ResponseCacheControl, ResponseContentDisposition, ResponseContentEncoding, ResponseContentLanguage, ResponseContentType, ResponseExpires, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, VersionId are missing in GetObjectInput (exhaustivestruct)
out, err := cli.s3.GetObject(cli.GetContext(), &sdksss.GetObjectInput{
^
aws/object/object.go:79:49: ExpectedBucketOwner, IfMatch, IfModifiedSince, IfNoneMatch, IfUnmodifiedSince, PartNumber, Range, RequestPayer, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, VersionId are missing in HeadObjectInput (exhaustivestruct)
out, e := cli.s3.HeadObject(cli.GetContext(), &sdksss.HeadObjectInput{
^
aws/object/object.go:106:50: ACL, CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentLength, ContentMD5, ContentType, ExpectedBucketOwner, Expires, GrantFullControl, GrantRead, GrantReadACP, GrantWriteACP, Metadata, ObjectLockLegalHoldStatus, ObjectLockMode, ObjectLockRetainUntilDate, RequestPayer, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, SSEKMSEncryptionContext, SSEKMSKeyId, ServerSideEncryption, StorageClass, Tagging, WebsiteRedirectLocation are missing in PutObjectInput (exhaustivestruct)
out, err := cli.s3.PutObject(cli.GetContext(), &sdksss.PutObjectInput{
^
aws/object/object.go:126:51: BypassGovernanceRetention, ExpectedBucketOwner, MFA, RequestPayer, VersionId are missing in DeleteObjectInput (exhaustivestruct)
_, err := cli.s3.DeleteObject(cli.GetContext(), &sdksss.DeleteObjectInput{
^
aws/policy/policies.go:51:54: Path is missing in CreatePolicyInput (exhaustivestruct)
out, err := cli.iam.CreatePolicy(cli.GetContext(), &iam.CreatePolicyInput{
^
aws/policy/policies.go:65:60: Marker, MaxItems are missing in ListPolicyVersionsInput (exhaustivestruct)
out, err := cli.iam.ListPolicyVersions(cli.GetContext(), &iam.ListPolicyVersionsInput{
^
aws/policy/policies.go:100:60: Marker, MaxItems are missing in ListPolicyVersionsInput (exhaustivestruct)
out, err := cli.iam.ListPolicyVersions(cli.GetContext(), &iam.ListPolicyVersionsInput{
^
aws/role/policy.go:36:66: Marker, MaxItems, PathPrefix are missing in ListAttachedRolePoliciesInput (exhaustivestruct)
out, err := cli.iam.ListAttachedRolePolicies(cli.GetContext(), &iam.ListAttachedRolePoliciesInput{
^
aws/role/role.go:58:52: Description, MaxSessionDuration, Path, PermissionsBoundary, Tags are missing in CreateRoleInput (exhaustivestruct)
out, err := cli.iam.CreateRole(cli.GetContext(), &iam.CreateRoleInput{
^
aws/user/access.go:40:10: Marker, MaxItems are missing in ListAccessKeysInput (exhaustivestruct)
req = &iam.ListAccessKeysInput{
^
aws/user/access.go:88:13: UserName is missing in DeleteAccessKeyInput (exhaustivestruct)
var req = &iam.DeleteAccessKeyInput{
^
aws/user/user.go:67:52: Path, PermissionsBoundary, Tags are missing in CreateUserInput (exhaustivestruct)
out, err := cli.iam.CreateUser(cli.GetContext(), &iam.CreateUserInput{
^
aws/interface.go:175:17: UseAccelerate, UseDualstack are missing in Options (exhaustivestruct)
s = sdksss.New(sdksss.Options{
^
httpcli/cli.go:77:9: Dial, DialTLSContext, DialTLS, TLSClientConfig, TLSHandshakeTimeout, DisableKeepAlives, MaxIdleConns, MaxIdleConnsPerHost, MaxConnsPerHost, IdleConnTimeout, ResponseHeaderTimeout, ExpectContinueTimeout, TLSNextProto, ProxyConnectHeader, MaxResponseHeaderBytes, WriteBufferSize, ReadBufferSize, ForceAttemptHTTP2 are missing in Transport (exhaustivestruct)
tr := &http.Transport{
^
httpcli/cli.go:105:8: CheckRedirect, Jar, Timeout are missing in Client (exhaustivestruct)
c := &http.Client{
^
aws/configAws/models.go:142:7: Deadline, LocalAddr, DualStack, FallbackDelay, Resolver, Cancel, Control are missing in Dialer (exhaustivestruct)
d := net.Dialer{
^
aws/configCustom/models.go:218:10: HostnameImmutable, PartitionID, SigningName, SigningRegion, SigningMethod are missing in Endpoint (exhaustivestruct)
return sdkaws.Endpoint{
^
aws/configCustom/models.go:224:10: HostnameImmutable, PartitionID, SigningName, SigningRegion, SigningMethod are missing in Endpoint (exhaustivestruct)
return sdkaws.Endpoint{
^
aws/configCustom/models.go:265:7: Deadline, LocalAddr, DualStack, FallbackDelay, Resolver, Cancel, Control are missing in Dialer (exhaustivestruct)
d := net.Dialer{
^
httpserver/http.go:107:15: Scheme, Opaque, User, Path, RawPath, ForceQuery, RawQuery, Fragment, RawFragment are missing in URL (exhaustivestruct)
srv.addr = &url.URL{
^
httpserver/http.go:183:13: ReadTimeout, ReadHeaderTimeout, WriteTimeout, IdleTimeout, MaxHeaderBytes, TLSNextProto, ConnState, BaseContext, ConnContext are missing in Server (exhaustivestruct)
srv.srv = &http.Server{
^
httpserver/http.go:190:10: MaxHandlers, MaxConcurrentStreams, MaxReadFrameSize, PermitProhibitedCipherSuites, MaxUploadBufferPerConnection, MaxUploadBufferPerStream, NewWriteScheduler are missing in Server (exhaustivestruct)
cnf := &http2.Server{
^
ldap/ldap.go:114:7: Deadline, LocalAddr, DualStack, FallbackDelay, Resolver, Cancel, Control are missing in Dialer (exhaustivestruct)
d := net.Dialer{
^
ldap/ldap.go:154:7: Deadline, LocalAddr, DualStack, FallbackDelay, Resolver, Cancel, Control are missing in Dialer (exhaustivestruct)
d := net.Dialer{
^
oauth/client.go:86:4: TokenType, RefreshToken, Expiry are missing in Token (exhaustivestruct)
&oauth2.Token{AccessToken: tokenOAuth},
^
router/auth.go:53:32: Meta is missing in Error (exhaustivestruct)
c.Errors = append(c.Errors, &gin.Error{
^
router/auth.go:65:32: Meta is missing in Error (exhaustivestruct)
c.Errors = append(c.Errors, &gin.Error{
^
router/auth.go:137:33: Meta is missing in Error (exhaustivestruct)
c.Errors = append(c.Errors, &gin.Error{
^
smtp/address.go:67:10: Address is missing in mailAddress (exhaustivestruct)
return &mailAddress{
^
smtp/address.go:89:10: Address is missing in Address (exhaustivestruct)
obj = &mail.Address{
^
smtp/address.go:94:10: Address is missing in mailAddress (exhaustivestruct)
return &mailAddress{
^
smtp/address.go:100:10: Address is missing in mailAddress (exhaustivestruct)
return &mailAddress{
^
smtp/config.go:151:14: Host, Port, User, Pass, Net, TLS, SkipVerify, ServerName are missing in smtpConfig (exhaustivestruct)
smtpcnf = &smtpConfig{
^
status/status.go:333:33: Meta is missing in Error (exhaustivestruct)
c.Errors = append(c.Errors, &gin.Error{
^
status/status.go:357:9: StatusItemResponse, Component are missing in StatusResponse (exhaustivestruct)
res := StatusResponse{
^
aws/aws_suite_test.go:85:11: Opaque, User, Path, RawPath, ForceQuery, RawQuery, Fragment, RawFragment are missing in URL (exhaustivestruct)
uri = &url.URL{
^
aws/user_test.go:66:13: Arn, CreateDate, Path, UserId, PasswordLastUsed, PermissionsBoundary, Tags are missing in User (exhaustivestruct)
user = &types.User{
^
aws/helper/partSize.go:163:12: error returned from interface method should be wrapped (wrapcheck)
return n, e
^
console/prompt.go:60:14: error returned from external package is unwrapped (wrapcheck)
return res, err
^
console/prompt.go:93:22: error returned from external package is unwrapped (wrapcheck)
return string(res), err
^
aws/aws_suite_test.go:139:10: error returned from external package is unwrapped (wrapcheck)
return err
^
aws/aws_suite_test.go:143:10: error returned from external package is unwrapped (wrapcheck)
return err
^
aws/aws_suite_test.go:147:10: error returned from external package is unwrapped (wrapcheck)
return err
^