@@ -334,15 +334,15 @@ func awsMarketplaceProductCode() string {
334334
335335func (u * BatchUpdater ) Increase (rows uint32 ) error {
336336 if u .usageIncreaseMethod == UsageIncreaseMethodBreakdown {
337- return fmt . Errorf ("mixing usage increase methods is not allowed, use IncreaseForTable instead" )
337+ return errors . New ("mixing usage increase methods is not allowed, use IncreaseForTable instead" )
338338 }
339339
340340 if rows <= 0 {
341341 return fmt .Errorf ("rows must be greater than zero got %d" , rows )
342342 }
343343
344344 if u .isClosed {
345- return fmt . Errorf ("usage updater is closed" )
345+ return errors . New ("usage updater is closed" )
346346 }
347347
348348 u .Lock ()
@@ -364,15 +364,15 @@ func (u *BatchUpdater) Increase(rows uint32) error {
364364
365365func (u * BatchUpdater ) IncreaseForTable (table string , rows uint32 ) error {
366366 if u .usageIncreaseMethod == UsageIncreaseMethodTotal {
367- return fmt . Errorf ("mixing usage increase methods is not allowed, use Increase instead" )
367+ return errors . New ("mixing usage increase methods is not allowed, use Increase instead" )
368368 }
369369
370370 if rows <= 0 {
371371 return fmt .Errorf ("rows must be greater than zero got %d" , rows )
372372 }
373373
374374 if u .isClosed {
375- return fmt . Errorf ("usage updater is closed" )
375+ return errors . New ("usage updater is closed" )
376376 }
377377
378378 u .Lock ()
@@ -696,7 +696,7 @@ func (u *BatchUpdater) getTeamNameByTokenType(tokenType auth.TokenType) (string,
696696 return "" , fmt .Errorf ("failed to get team name from config: %w" , err )
697697 }
698698 if teamName == "" {
699- return "" , fmt . Errorf ("team name not set. Hint: use `cloudquery switch <team>`" )
699+ return "" , errors . New ("team name not set. Hint: use `cloudquery switch <team>`" )
700700 }
701701 return teamName , nil
702702 case auth .APIKey :
@@ -716,7 +716,7 @@ func (u *BatchUpdater) getTeamNameByTokenType(tokenType auth.TokenType) (string,
716716 if team == "" {
717717 switch tokenType {
718718 case auth .SyncRunAPIKey , auth .SyncTestConnectionAPIKey :
719- return "" , fmt . Errorf ("_CQ_TEAM_NAME environment variable not set" )
719+ return "" , errors . New ("_CQ_TEAM_NAME environment variable not set" )
720720 }
721721 return "" , fmt .Errorf ("unsupported token type: %v" , tokenType )
722722 }
0 commit comments