dex/schema/workerschema/util.go
2015-08-18 11:26:57 -07:00

14 lines
265 B
Go

package workerschema
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
}