Skip to content

Commit

Permalink
resolver: document that SetDefaultScheme should be called at init time (
Browse files Browse the repository at this point in the history
#2217)

fixes #2216
  • Loading branch information
menghanl authored Jul 16, 2018
1 parent 1dab6d1 commit c8fcd32
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ func Get(scheme string) Builder {
return nil
}

// SetDefaultScheme sets the default scheme that will be used.
// The default default scheme is "passthrough".
// SetDefaultScheme sets the default scheme that will be used. The default
// default scheme is "passthrough".
//
// NOTE: this function must only be called during initialization time (i.e. in
// an init() function), and is not thread-safe. The scheme set last overrides
// previously set values.
func SetDefaultScheme(scheme string) {
defaultScheme = scheme
}
Expand Down

0 comments on commit c8fcd32

Please sign in to comment.