forked from electricdusk/rushlink
[refactor] Add !=nil check in renderCreateSuccess
This commit is contained in:
parent
ca859adab1
commit
087b9920e6
3
views.go
3
views.go
@ -155,6 +155,9 @@ func (rl *rushlink) renderInternalServerError(w http.ResponseWriter, r *http.Req
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (rl *rushlink) renderCreateSuccess(w http.ResponseWriter, r *http.Request, paste *db.Paste, fu *db.FileUpload) {
|
func (rl *rushlink) renderCreateSuccess(w http.ResponseWriter, r *http.Request, paste *db.Paste, fu *db.FileUpload) {
|
||||||
|
if paste == nil {
|
||||||
|
panic("paste should not be nil")
|
||||||
|
}
|
||||||
var fileExt string
|
var fileExt string
|
||||||
if fu != nil {
|
if fu != nil {
|
||||||
fileExt = fu.Ext()
|
fileExt = fu.Ext()
|
||||||
|
Loading…
Reference in New Issue
Block a user