Skip to content
Snippets Groups Projects
Commit 585bb612 authored by ko_oler's avatar ko_oler
Browse files

fix

parent 0ca3f2f7
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,11 @@ func NewURL(action string) (*URL, error) {
// ID возвращает сохраненный в URL id действия
func (u *URL) ID() string {
if u.Scheme == "grpc" {
return strings.Split(strings.TrimLeft(u.Path, "/"), "/")[1]
}
return ""
}
// SetID устанавливает в URL id действия
func (u *URL) SetID(id string) {
......@@ -49,8 +52,11 @@ func (u *URL) SetID(id string) {
// Extension возвращает сохраненный в URL id расширения
func (u *URL) Extension() string {
if u.Scheme == "grpc" {
return strings.Split(strings.TrimLeft(u.Path, "/"), "/")[0]
}
return ""
}
// SetExtension устанавливает в URL id расширения
func (u *URL) SetExtension(ext string) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment