Declare url outside of if else statement
This commit is contained in:
parent
e4138172af
commit
2d827f5b64
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