resolver: document that SetDefaultScheme should be called at init time (#2217)

fixes #2216
This commit is contained in:
Menghan Li
2018-07-16 11:19:04 -07:00
committed by GitHub
parent 1dab6d184d
commit c8fcd323ef

View File

@ -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
}