Skip to content

Commit 5779afb

Browse files
committed
Address review comments
1 parent 75f52a8 commit 5779afb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

google/appengine_gen2_flex.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ import (
1616
"golang.org/x/oauth2"
1717
)
1818

19-
var (
20-
once sync.Once
21-
22-
logFunc = func() {
23-
log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.")
24-
}
25-
)
19+
var logOnce sync.Once // only spam about deprecation once
2620

2721
// See comment on AppEngineTokenSource in appengine.go.
2822
func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource {
29-
once.Do(logFunc)
23+
logOnce.Do(func() {
24+
log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.")
25+
})
3026
return ComputeTokenSource("")
3127
}

0 commit comments

Comments
 (0)