dependency/vault_read.go
func NewVaultReadQuery(s string) (*VaultReadQuery, error) {
	s = strings.TrimSpace(s)
	s = strings.Trim(s, "/")
	if s == "" {
		return nil, fmt.Errorf("vault.read: invalid format: %q", s)
	}

	secretURL, err := url.Parse(s)
	if err != nil {
		return nil, err
	}

	return &VaultReadQuery{
		stopCh:      make(chan struct{}, 1),
		rawPath:     secretURL.Path,
		queryValues: secretURL.Query(),
	}, nil
}
func NewVaultReadQuery(s string) (*VaultReadQuery, error) {
	s = strings.TrimSpace(s)
	s = strings.Trim(s, "/")
	if s == "" {
		return nil, fmt.Errorf("vault.read: invalid format: %q", s)
	}

	secretURL, err := url.Parse(s)
	if err != nil {
		return nil, err
	}

	return &VaultReadQuery{
		stopCh:      make(chan struct{}, 1),
		rawPath:     secretURL.Path,
		queryValues: secretURL.Query(),
	}, nil
}
func NewVaultReadQuery ( s string ) ( * VaultReadQuery , error ) { s = strings . TrimSpace ( s ) s = strings . Trim ( s , " " ) if s == " " { return nil , fmt . Errorf ( " " , s ) } secretURL , err := url . Parse ( s ) if err != nil { return nil , err } return & VaultReadQuery { stopCh : make ( chan struct { } , 1 ) , rawPath : secretURL . Path , queryValues : secretURL . Query ( ) , } , nil }
// NewVaultReadQuery creates a new datacenter dependency.
NewVaultReadQuery creates a new datacenter dependency .