qual: use url.JoinPath()
for constructing Kamite cmd endpoint URLs
This commit is contained in:
parent
d27039fdb7
commit
27e12057bc
|
@ -25,6 +25,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/gotk3/gotk3/gdk"
|
||||
)
|
||||
|
@ -166,6 +167,6 @@ func kamiteSendOCRImageCommand(port int, imgBytes []byte, w, h int) {
|
|||
}
|
||||
|
||||
func kamiteMakeEndpointURL(port int, suffix string) string {
|
||||
// TODO(fau): Go 1.19+ url.JoinPath()
|
||||
return fmt.Sprintf(kamiteCMDEndpointBaseTpl, port) + suffix
|
||||
path, _ := url.JoinPath(fmt.Sprintf(kamiteCMDEndpointBaseTpl, port), suffix)
|
||||
return path
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue