Declare url outside of if else statement
This commit is contained in:
parent
33fc4a9df4
commit
6f985b8142
5
main.go
5
main.go
|
@ -92,10 +92,11 @@ func save(raw string, lang string) []string {
|
|||
}
|
||||
}
|
||||
id := generateName()
|
||||
var url string
|
||||
if lang == "" {
|
||||
url := ADDRESS + "/p/" + id
|
||||
url = ADDRESS + "/p/" + id
|
||||
} else {
|
||||
url := ADDRESS + "/p/" + id + "/" + lang
|
||||
url = ADDRESS + "/p/" + id + "/" + lang
|
||||
}
|
||||
delKey := uniuri.NewLen(40)
|
||||
paste := html.EscapeString(raw)
|
||||
|
|
Loading…
Reference in New Issue