Skip to content

Fix various linting issues, some refactoring and cleaning up - #39

Merged
Brian Goff (cpuguy83) merged 5 commits into
Azure:masterfrom
thaJeztah:refactor_and_linting_step1
Sep 17, 2026
Merged

Brian Goff (cpuguy83) merged 5 commits into
Azure:masterfrom
thaJeztah:refactor_and_linting_step1

Conversation

@thaJeztah

Copy link
Copy Markdown
Contributor

@thaJeztah

Copy link
Copy Markdown
Contributor Author

/cc Olivier Mengué (@dolmen) ptal

Current versions of go refused to run tests;

    go vet .
    parser.go:139:37: logf format %s arg newState.Name is a func value, not called

    go test
    # github.com/Azure/go-ansiterm
    # [github.com/Azure/go-ansiterm]
    ./parser.go:139:37: logf format %s arg newState.Name is a func value, not called
    FAIL	github.com/Azure/go-ansiterm [build failed]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Fix linting, remove the unused error-return from parseParams, and inline
the parseCmd utility.

    parser.go:116:10: ST1005: error strings should not end with punctuation or newlines (staticcheck)
            return errors.New("New state of 'nil' is invalid.")
                   ^
    parser_action_helpers.go:8:28: S1019: should use make([]byte, 0) instead (staticcheck)
        paramBuff := make([]byte, 0, 0)
                                  ^
    parser_action_helpers.go:17:30: S1019: should use make([]byte, 0) instead (staticcheck)
                    paramBuff = make([]byte, 0, 0)
                                             ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Contributor Author

Brian Goff (@cpuguy83) rebased this one as well

@cpuguy83
Brian Goff (cpuguy83) merged commit e937bb4 into Azure:master Sep 17, 2026
5 checks passed
@thaJeztah
Sebastiaan van Stijn (thaJeztah) deleted the refactor_and_linting_step1 branch September 17, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants