From a32b9fe723c633cf5349bb0479d97e1f6d04445d Mon Sep 17 00:00:00 2001 From: Melonai Date: Fri, 10 Sep 2021 23:40:49 +0200 Subject: Refactor path into destination --- config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config.go') diff --git a/config.go b/config.go index 7630e87..f5fec33 100644 --- a/config.go +++ b/config.go @@ -45,9 +45,9 @@ func (c *Config) TargetAddress(port int) string { } // MakeUrl creates the URL on the destination host that the user wants to access. -func (c *Config) MakeUrl(p Path) string { +func (c *Config) MakeUrl(p Destination) string { // TODO: Figure out what to do with TLS - return fmt.Sprintf("http://%s:%d%s", c.targetHost, p.DestinationIdentifier, p.ResourcePath) + return fmt.Sprintf("http://%s:%d%s", c.targetHost, p.Port, p.Path) } // CheckKey checks whether the givenKey matches the one in the config. -- cgit 1.4.1