Skip to content

Commit d751c18

Browse files
committed
chore: fix ST1017: don't use Yoda conditions (staticcheck)
1 parent e694cf6 commit d751c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,11 @@ func (gc *gitlabClient) Valid(ctx context.Context) bool {
574574
var _ Client = new(gitlabClient)
575575

576576
func newGitlabClient(config *EntryConfig, httpClient *http.Client) (gc *g.Client, err error) {
577-
if "" == strings.TrimSpace(config.BaseURL) {
577+
if strings.TrimSpace(config.BaseURL) == "" {
578578
err = errors.Join(err, fmt.Errorf("gitlab base url: %w", ErrInvalidValue))
579579
}
580580

581-
if "" == strings.TrimSpace(config.Token) {
581+
if strings.TrimSpace(config.Token) == "" {
582582
err = errors.Join(err, fmt.Errorf("gitlab token: %w", ErrInvalidValue))
583583
}
584584

0 commit comments

Comments
 (0)