aboutsummaryrefslogtreecommitdiff
path: root/http_target.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-06-08 23:33:09 +0700
committerShulhan <ms@kilabit.info>2024-06-08 23:33:09 +0700
commita36f12356cdceda9e437ebf50bea1f370b25c716 (patch)
tree859d2b0dd773d9f8009f40554c825bf0287565f8 /http_target.go
parentda42a48ebec77232a90723a2dd35441402998b11 (diff)
downloadgorankusu-a36f12356cdceda9e437ebf50bea1f370b25c716.tar.xz
all: use [route.Path] to generate parameters
Using [route.String] does not works if the parameter can be empty, while [route.Path] replace all keys and return the path as is.
Diffstat (limited to 'http_target.go')
-rw-r--r--http_target.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/http_target.go b/http_target.go
index 8e02b14..0fdbc10 100644
--- a/http_target.go
+++ b/http_target.go
@@ -231,7 +231,7 @@ func (ht *HTTPTarget) paramsToPath() {
}
}
- ht.Path = rute.String()
+ ht.Path = rute.Path()
}
// refCopy copy original fields, methods, and handlers that cannot be