From 9c36dd2732b8f23d6bf360c615548bc38d9c447c Mon Sep 17 00:00:00 2001 From: kreativmonkey Date: Wed, 28 Jun 2017 19:08:31 +0200 Subject: [PATCH] Fix API Issue Close #5 --- main.go | 2 +- short/shrt.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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