Skip to content

Commit

Permalink
fix linting errors: unused var t, unexported-return
Browse files Browse the repository at this point in the history
```
runner/util_test.go:237:34: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
func TestGetStructureFieldTagMap(t *testing.T) {
```

```
main.go:54:1: exported function GetVersionInfo should have comment or be unexported
main.go:54:23: exported func GetVersionInfo returns unexported type main.versionInfo, which can be annoying to use
```
  • Loading branch information
lukmdo committed Dec 13, 2023
1 parent 045e742 commit 8b09680
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type versionInfo struct {
goVersion string
}

func GetVersionInfo() versionInfo {
func GetVersionInfo() versionInfo { //revive:disable:unexported-return
if len(airVersion) != 0 && len(goVersion) != 0 {
return versionInfo{
airVersion: airVersion,
Expand Down
1 change: 1 addition & 0 deletions runner/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func Test_killCmd_SendInterrupt_false(t *testing.T) {
func TestGetStructureFieldTagMap(t *testing.T) {
c := Config{}
tagMap := flatConfig(c)
assert.NotEmpty(t, tagMap)
for _, i2 := range tagMap {
fmt.Printf("%v\n", i2.fieldPath)
}
Expand Down

0 comments on commit 8b09680

Please sign in to comment.