mirror of
https://github.com/Luzifer/ots.git
synced 2025-07-24 07:00:36 -04:00
CI: Add code linting (#118)
This commit is contained in:
parent
546481dcfc
commit
8540d4016c
8 changed files with 200 additions and 14 deletions
6
main.go
6
main.go
|
@ -155,10 +155,12 @@ func assetDelivery(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
w.Header().Set("Content-Type", mime.TypeByExtension(ext))
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.Write(assetData)
|
||||
if _, err = w.Write(assetData); err != nil {
|
||||
logrus.WithError(err).Error("writing asset data")
|
||||
}
|
||||
}
|
||||
|
||||
func handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
func handleIndex(w http.ResponseWriter, _ *http.Request) {
|
||||
inlineContentNonce := make([]byte, scriptNonceSize)
|
||||
if _, err := rand.Read(inlineContentNonce); err != nil {
|
||||
logrus.WithError(err).Error("generating script nonce")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue