Skip to content
Snippets Groups Projects
Commit 5f02d537 authored by william feng's avatar william feng
Browse files

added comment to file.go

parent 96a36881
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,12 @@ func (f *FileConditionRouter) URL() common.URL {
return f.url
}
// The input value must follow [{group}/]{service}[:{version}] pattern
// the returning strings are representing group, service, version respectively.
// input: mock-group/mock-service:1.0.0 ==> "mock-group", "mock-service", "1.0.0"
// input: mock-group/mock-service ==> "mock-group", "mock-service", ""
// input: mock-service:1.0.0 ==> "", "mock-service", "1.0.0"
// For more samples, please refer to unit test.
func parseServiceRouterKey(key string) (string, string, string, error) {
if len(strings.TrimSpace(key)) == 0 {
return "", "", "", nil
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment