aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build.yml19
-rw-r--r--http_handle_repo_raw.go2
-rw-r--r--http_handle_repo_tree.go2
3 files changed, 21 insertions, 2 deletions
diff --git a/.build.yml b/.build.yml
new file mode 100644
index 0000000..38e2571
--- /dev/null
+++ b/.build.yml
@@ -0,0 +1,19 @@
+image: alpine/edge
+packages:
+ - go
+ - golangci-lint
+ - make
+ - gcc
+ - musl-dev
+sources:
+ - ssh://forge.lindenii.runxiyu.org/lindenii/forge/:/repos/server/
+tasks:
+ - prepare: |
+ cd server
+ git checkout go
+ - build: |
+ cd server
+ make
+ - lint: |
+ cd server
+ golangci-lint run .
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go
index 36e59d7..aab64b6 100644
--- a/http_handle_repo_raw.go
+++ b/http_handle_repo_raw.go
@@ -33,7 +33,7 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params
}
refHashSlice = refHash[:]
- cacheHandle := append(refHashSlice, []byte(pathSpec)...)
+ cacheHandle := append(refHashSlice, []byte(pathSpec)...) //nolint:gocritic
if value, found := treeReadmeCache.Get(cacheHandle); found {
params["files"] = value.DisplayTree
diff --git a/http_handle_repo_tree.go b/http_handle_repo_tree.go
index 7d95c02..1bb9940 100644
--- a/http_handle_repo_tree.go
+++ b/http_handle_repo_tree.go
@@ -39,7 +39,7 @@ func httpHandleRepoTree(writer http.ResponseWriter, request *http.Request, param
}
refHashSlice = refHash[:]
- cacheHandle := append(refHashSlice, []byte(pathSpec)...)
+ cacheHandle := append(refHashSlice, []byte(pathSpec)...) //nolint:gocritic
if value, found := treeReadmeCache.Get(cacheHandle); found {
params["files"] = value.DisplayTree