diff --git a/main.go b/main.go index 5b2c362..c7152a2 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "fmt" ) -const version = "0.01" +const version = "0.02" const port = "9090" const db = "./test.db" diff --git a/short/shrt.go b/short/shrt.go index 2232a31..e3c6596 100644 --- a/short/shrt.go +++ b/short/shrt.go @@ -55,7 +55,7 @@ func (s *Storage) Short(URL string, value *string) error { // Test if the URL alraedy exist and return the key if val, ok := s.Url[hash]; ok { - value = &val + *value = val return nil } // Iterate to the length of hash to get the shortest output