dex/schema/adminschema/util.go

15 lines
264 B
Go
Raw Permalink Normal View History

2015-08-18 05:57:27 +05:30
package adminschema
import (
"net/http"
"strings"
)
func NewWithBasePath(client *http.Client, basePath string) (*Service, error) {
s, err := New(client)
if err == nil {
s.BasePath = strings.Replace(s.BasePath, "$ENDPOINT", basePath, 1)
}
return s, nil
}