Skip to content
Snippets Groups Projects
Commit 70a32ee2 authored by ko_oler's avatar ko_oler
Browse files

fix

parent c3274564
No related branches found
No related tags found
No related merge requests found
......@@ -20,11 +20,13 @@ func NewActionURL(action string) (*ActionURL, error) {
}
func (u *ActionURL) actionParts() (string, string) {
if u.URL != nil && u.URL.Scheme == "grpc" {
splitPath := strings.Split(strings.TrimLeft(u.Path, "/"), "/")
if len(splitPath) >= 2 {
return splitPath[0], splitPath[1]
}
splitPath := strings.Split(strings.TrimLeft(u.Path, "/"), "/")
if u.URL != nil && u.URL.Scheme == "grpc" && len(splitPath) >= 2 {
return splitPath[0], splitPath[1]
}
// for backwards compatibility
if len(splitPath) == 1 {
return "", splitPath[0]
}
return "", ""
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment