diff options
| author | Shulhan <ms@kilabit.info> | 2024-06-08 23:33:09 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-06-08 23:33:09 +0700 |
| commit | a36f12356cdceda9e437ebf50bea1f370b25c716 (patch) | |
| tree | 859d2b0dd773d9f8009f40554c825bf0287565f8 | |
| parent | da42a48ebec77232a90723a2dd35441402998b11 (diff) | |
| download | gorankusu-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.
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | go.sum | 4 | ||||
| -rw-r--r-- | http_target.go | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -7,7 +7,7 @@ go 1.21 require ( git.sr.ht/~shulhan/ciigo v0.13.0 - git.sr.ht/~shulhan/pakakeh.go v0.55.0 + git.sr.ht/~shulhan/pakakeh.go v0.55.1-0.20240608161152-274ef1036f8a github.com/tsenart/vegeta/v12 v12.11.1 golang.org/x/tools v0.22.0 ) @@ -2,8 +2,8 @@ git.sr.ht/~shulhan/asciidoctor-go v0.5.2 h1:tjG/NQJ1om2F70L7DwOvmr+n1kfgk9xhIBX+ git.sr.ht/~shulhan/asciidoctor-go v0.5.2/go.mod h1:fHXUiw7IbOOMyoHHvnd351Jini/MNZgutiFTtsCQ+Yk= git.sr.ht/~shulhan/ciigo v0.13.0 h1:hnTuAJv+3B9HSTaTxJu7WC7A0/Ft82Hw+C41vj4ByFA= git.sr.ht/~shulhan/ciigo v0.13.0/go.mod h1:8iRMRzu3p4Y0qunVujK0gBpYpwe1rZOGHUAAIp52fXM= -git.sr.ht/~shulhan/pakakeh.go v0.55.0 h1:rrAJjqLQVmggdJSDAykH93LdzDIb5hSBCGWQOmlZpn8= -git.sr.ht/~shulhan/pakakeh.go v0.55.0/go.mod h1:UuyZtTCMJaTZI/33DBlyyJt1eF96fDPhPg9ZBHptWMU= +git.sr.ht/~shulhan/pakakeh.go v0.55.1-0.20240608161152-274ef1036f8a h1:Hgz7t8y4zqZqpdclXLf3MaWCJf83titZWNJdF+6Cs0o= +git.sr.ht/~shulhan/pakakeh.go v0.55.1-0.20240608161152-274ef1036f8a/go.mod h1:UuyZtTCMJaTZI/33DBlyyJt1eF96fDPhPg9ZBHptWMU= github.com/bmizerany/perks v0.0.0-20230307044200-03f9df79da1e h1:mWOqoK5jV13ChKf/aF3plwQ96laasTJgZi4f1aSOu+M= github.com/bmizerany/perks v0.0.0-20230307044200-03f9df79da1e/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 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 |
