Add Linter Step (#698)

6543 created

* Add Linter Step

* format code

Change summary

.github/workflows/go.yml | 14 ++++++++++++++
webui/packed_assets.go   |  2 +-
2 files changed, 15 insertions(+), 1 deletion(-)

Detailed changes

.github/workflows/go.yml 🔗

@@ -39,3 +39,17 @@ jobs:
           GITHUB_TOKEN_PUBLIC: ${{ secrets._GITHUB_TOKEN_PUBLIC }}
           GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
           GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
+  
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Check Code Formation
+        run: find . -name "*.go" | while read line; do [ -z "$(gofmt -d "$line" | head)" ] || exit 1; done

webui/packed_assets.go 🔗

@@ -134,7 +134,7 @@ func (fs vfsgen۰FS) Open(path string) (http.File, error) {
 		}
 		return &vfsgen۰CompressedFile{
 			vfsgen۰CompressedFileInfo: f,
-			gr: gr,
+			gr:                        gr,
 		}, nil
 	case *vfsgen۰DirInfo:
 		return &vfsgen۰Dir{