Linting things.
This commit is contained in:
@@ -42,7 +42,7 @@ func indexGet(ec echo.Context) error {
|
||||
// We should check if database connection available.
|
||||
dbConn := c.Database.GetDatabaseConnection()
|
||||
if c.Config.Database.Type != "flatfiles" && dbConn == nil {
|
||||
ec.Redirect(http.StatusFound, "/database_not_available")
|
||||
return ec.Redirect(http.StatusFound, "/database_not_available")
|
||||
}
|
||||
|
||||
// Generate list of available languages to highlight.
|
||||
|
@@ -77,11 +77,6 @@ func pasteGetData(pasteID int, timestamp int64, cookieValue string) (*structs.Pa
|
||||
return paste, ""
|
||||
}
|
||||
|
||||
// GET for "/api/paste/PASTE_ID" and "/api/paste/PASTE_ID/TIMESTAMP".
|
||||
func pasteGETApi(ec echo.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GET for "/paste/PASTE_ID" and "/paste/PASTE_ID/TIMESTAMP" (private pastes).
|
||||
// Web interface version.
|
||||
func pasteGETWebInterface(ec echo.Context) error {
|
||||
|
@@ -112,7 +112,7 @@ func pastePOSTWebInterface(ec echo.Context) error {
|
||||
}
|
||||
|
||||
if pastePassword[0] != "" {
|
||||
paste.CreatePassword(pastePassword[0])
|
||||
_ = paste.CreatePassword(pastePassword[0])
|
||||
}
|
||||
|
||||
id, err2 := c.Database.SavePaste(paste)
|
||||
|
@@ -79,7 +79,7 @@ func pastesGET(ec echo.Context) error {
|
||||
|
||||
// Get max 4 lines of each paste.
|
||||
pasteDataSplitted := strings.Split(pastes[i].Data, "\n")
|
||||
var pasteData = ""
|
||||
var pasteData string
|
||||
if len(pasteDataSplitted) < 4 {
|
||||
pasteData = pastes[i].Data
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user