aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-01-22 21:59:34 +0000
committerGitHub <noreply@github.com>2022-01-22 21:59:34 +0000
commit1ddfa596c8d9acb4fa5c04ed25df374b6e51c4b9 (patch)
treea9784ccd9d80d50e339fcd8ee65a6ff87f111c3f
parenta82fd98d5368a75cbcf6b74c12f58f3f81e66662 (diff)
downloadgitea-1ddfa596c8d9acb4fa5c04ed25df374b6e51c4b9.tar.gz
gitea-1ddfa596c8d9acb4fa5c04ed25df374b6e51c4b9.zip
Make gitea, gitea-vet future-proof (#18361)
* Make gitea, gitea-vet future-proof - Ref: https://gitea.com/gitea/gitea-vet/pulls/18 * Correct order Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--modules/json/json.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 624896bbaa..b9de6b6997 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -141,8 +141,8 @@ For imports you should use the following format (_without_ the comments)
```go
import (
// stdlib
- "encoding/json"
"fmt"
+ "math"
// local packages
"code.gitea.io/gitea/models"
diff --git a/modules/json/json.go b/modules/json/json.go
index 1cbb658261..3afa86023c 100644
--- a/modules/json/json.go
+++ b/modules/json/json.go
@@ -4,6 +4,7 @@
package json
+// Allow "encoding/json" import.
import (
"bytes"
"encoding/binary"