forked from vmware/govmomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See, $ golangci-lint run --disable-all --enable=gosimple govc/cluster/rule/ls.go:80:23: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple) res = append(res, fmt.Sprintf("%s", ruleName)) ^ govc/dvs/portgroup/info.go:105:10: S1034: assigning the result of this type assertion to a variable (switch port := port.(type)) could eliminate the following type assertions: govc/dvs/portgroup/info.go:109:78 (gosimple) switch port.(type) { ^ govc/dvs/portgroup/info.go:119:11: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple) return fmt.Sprintf("%s", address.(*types.SingleIp).Address) ^ govc/vm/info.go:105:3: S1020: when ok is true, err can't be nil (gosimple) if _, ok := err.(*find.NotFoundError); ok { ^ govc/vm/network/add.go:77:11: S1028: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (gosimple) return errors.New(fmt.Sprintf("couldn't set specified network %v", ^ govc/vm/network/change.go:90:11: S1028: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (gosimple) return errors.New(fmt.Sprintf("couldn't set specified network %v", ^ object/diagnostic_manager.go:74:2: S1031: unnecessary nil check around range (gosimple) if host != nil { ^ simulator/host_datastore_browser.go:131:5: S1008: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (gosimple) if strings.HasSuffix(name, "-flat.vmdk") { ^ test/functional/helper.go:118:30: S1002: should omit comparison to bool constant, can be simplified to `*i.Vmfs.Local` (gosimple) if i.Vmfs.Local != nil && *i.Vmfs.Local == true { ^ toolbox/process_test.go:229:2: S1021: should merge variable declaration with assignment on next line (gosimple) var err error ^ toolbox/vix/protocol.go:819:46: S1030: should use buf.String() instead of string(buf.Bytes()) (gosimple) str, err := base64.StdEncoding.DecodeString(string(buf.Bytes())) ^ units/size_test.go:35:12: S1025: should use String() instead of fmt.Sprintf (gosimple) actual := fmt.Sprintf("%s", b) ^ vapi/library/finder/finder.go:74:2: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix` (gosimple) if strings.HasPrefix(ipath, "/") { ^
- Loading branch information
1 parent
2458627
commit d45b5f3
Showing
12 changed files
with
23 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters