simplify path reservation
This commit is contained in:
@@ -40,11 +40,11 @@ func ToMethod(str string) METHOD {
|
||||
var HTTPCallerInstance = &HTTPCaller{} // Singleton instance of the HTTPCaller
|
||||
|
||||
type HTTPCaller struct {
|
||||
URLS map[string]map[METHOD]string // Map of the different methods and their urls
|
||||
URLS map[DataType]map[METHOD]string // Map of the different methods and their urls
|
||||
}
|
||||
|
||||
// NewHTTPCaller creates a new instance of the HTTP Caller
|
||||
func NewHTTPCaller(urls map[string]map[METHOD]string) *HTTPCaller {
|
||||
func NewHTTPCaller(urls map[DataType]map[METHOD]string) *HTTPCaller {
|
||||
return &HTTPCaller{
|
||||
URLS: urls, // Set the urls defined in the config & based on the data name type & method
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user