Skip to content

Commit b9d7f34

Browse files
committed
fix get
1 parent c35276f commit b9d7f34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/ingressCache/pathTrie.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ func (p *PathTree) DeleteFunctionName(path string, function string) error {
8080
// GetFunctionName retrieve the closest prefix matching the path and returns the associated functions
8181
func (p *PathTree) GetFunctionName(path string) ([]string, error) {
8282
var walkPathResult interface{}
83+
if path == "" {
84+
return nil, errors.New("path is empty")
85+
}
86+
8387
if err := p.t.WalkPath(path, func(_ string, value interface{}) error {
8488
if value != nil {
8589
walkPathResult = value

0 commit comments

Comments
 (0)