Browse Source

Easier to read?

Piotr Czajkowski 3 years ago
parent
commit
0d0f1fffe1
1 changed files with 3 additions and 2 deletions
  1. 3 2
      storage.go

+ 3 - 2
storage.go

@@ -64,10 +64,11 @@ func addLink(link string, toSave chan<- string) string {
 		if existingLink != link {
 			log.Printf("Have collision:\n%s\n%s\n", link, existingLink)
 		}
-	} else {
-		toSave <- fmt.Sprintf(format, linkID, link)
+
+		return linkID
 	}
 
+	toSave <- fmt.Sprintf(format, linkID, link)
 	return linkID
 }