Skip to content
Snippets Groups Projects
Commit 03f164ab authored by haohongfan's avatar haohongfan
Browse files

feat: update

parent cfc6ef79
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ var (
func TestNewBaseDirectory(t *testing.T) {
dir := NewBaseDirectory(url)
assert.Equal(t, url, dir.GetUrl())
assert.Equal(t, &url, dir.GetDirectoryUrl())
assert.Equal(t, url, dir.GetDirectoryUrl())
}
func TestBuildRouterChain(t *testing.T) {
......
......@@ -402,9 +402,6 @@ func (c *URL) Service() string {
func (c *URL) AddParam(key string, value string) {
c.paramsLock.Lock()
defer c.paramsLock.Unlock()
if len(value) == 0 {
return
}
c.params.Add(key, value)
}
......@@ -415,9 +412,6 @@ func (c *URL) AddParamAvoidNil(key string, value string) {
if c.params == nil {
c.params = url.Values{}
}
if len(value) == 0 {
return
}
c.params.Add(key, value)
}
......@@ -426,9 +420,6 @@ func (c *URL) AddParamAvoidNil(key string, value string) {
func (c *URL) SetParam(key string, value string) {
c.paramsLock.Lock()
defer c.paramsLock.Unlock()
if len(value) == 0 {
return
}
c.params.Set(key, value)
}
......
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