chore: unnecessary use of fmt.Sprintf
This commit is contained in:
parent
dbdbcfd100
commit
20fec65e6b
|
@ -57,7 +57,7 @@ func Configure(fname string, configSections string) (*SetupData, error) {
|
||||||
Success: "{{ . | bold | faint }}: ",
|
Success: "{{ . | bold | faint }}: ",
|
||||||
}
|
}
|
||||||
selTmpls := &promptui.SelectTemplates{
|
selTmpls := &promptui.SelectTemplates{
|
||||||
Selected: fmt.Sprintf(`{{.Label}} {{ . | faint }}`),
|
Selected: `{{.Label}} {{ . | faint }}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
var selPrompt promptui.Select
|
var selPrompt promptui.Select
|
||||||
|
|
2
posts.go
2
posts.go
|
@ -354,7 +354,7 @@ func handleViewPost(app *App, w http.ResponseWriter, r *http.Request) error {
|
||||||
return impart.HTTPError{http.StatusFound, fmt.Sprintf("/%s%s", fixedID, ext)}
|
return impart.HTTPError{http.StatusFound, fmt.Sprintf("/%s%s", fixedID, ext)}
|
||||||
}
|
}
|
||||||
|
|
||||||
err := app.db.QueryRow(fmt.Sprintf("SELECT owner_id, title, content, text_appearance, view_count, language, rtl FROM posts WHERE id = ?"), friendlyID).Scan(&ownerID, &title, &content, &font, &views, &language, &rtl)
|
err := app.db.QueryRow("SELECT owner_id, title, content, text_appearance, view_count, language, rtl FROM posts WHERE id = ?", friendlyID).Scan(&ownerID, &title, &content, &font, &views, &language, &rtl)
|
||||||
switch {
|
switch {
|
||||||
case err == sql.ErrNoRows:
|
case err == sql.ErrNoRows:
|
||||||
found = false
|
found = false
|
||||||
|
|
Loading…
Reference in New Issue