github.com/searKing/golang/go@v1.2.117/net/resolver/resolveoneaddr.options.go (about)

     1  // Copyright 2021 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package resolver
     6  
     7  // ResolveOneAddrOptionWithPickerOption append PickOption to picker
     8  func ResolveOneAddrOptionWithPickerOption(opts ...PickOption) ResolveOneAddrOption {
     9  	return ResolveOneAddrOptionFunc(func(opt *resolveOneAddr) {
    10  		opt.Picker = append(opt.Picker, opts...)
    11  	})
    12  }