Skip to content

Commit ae95408

Browse files
committed
chore: fix ST1017: don't use Yoda conditions (staticcheck)
1 parent 8c189a1 commit ae95408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab_client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -567,11 +567,11 @@ func (gc *gitlabClient) Valid(ctx context.Context) bool {
567567
var _ Client = new(gitlabClient)
568568

569569
func newGitlabClient(config *EntryConfig, httpClient *http.Client) (gc *g.Client, err error) {
570-
if "" == strings.TrimSpace(config.BaseURL) {
570+
if strings.TrimSpace(config.BaseURL) == "" {
571571
err = errors.Join(err, fmt.Errorf("gitlab base url: %w", ErrInvalidValue))
572572
}
573573

574-
if "" == strings.TrimSpace(config.Token) {
574+
if strings.TrimSpace(config.Token) == "" {
575575
err = errors.Join(err, fmt.Errorf("gitlab token: %w", ErrInvalidValue))
576576
}
577577

0 commit comments

Comments
 (0)