diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bc5742806..9b7deadec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: os: - ubuntu-latest - macos-latest - - windows-latest +# - windows-latest name: Golangci-Lint runs-on: ${{ matrix.os }} steps: @@ -29,4 +29,4 @@ jobs: uses: golangci/golangci-lint-action@v2 with: version: v1.40 - args: -E goimports -E gocritic -E misspell -E revive + args: -E gofumpt -E gocritic -E misspell -E revive diff --git a/codec.go b/codec.go index ed02a3c86..47ab25cce 100644 --- a/codec.go +++ b/codec.go @@ -42,12 +42,10 @@ type ( } // BuiltInFrameCodec is the built-in codec which will be assigned to gnet server when customized codec is not set up. - BuiltInFrameCodec struct { - } + BuiltInFrameCodec struct{} // LineBasedFrameCodec encodes/decodes line-separated frames into/from TCP stream. - LineBasedFrameCodec struct { - } + LineBasedFrameCodec struct{} // DelimiterBasedFrameCodec encodes/decodes specific-delimiter-separated frames into/from TCP stream. DelimiterBasedFrameCodec struct { diff --git a/gnet.go b/gnet.go index c35e2c666..abdfced9f 100644 --- a/gnet.go +++ b/gnet.go @@ -187,8 +187,7 @@ type ( // EventServer is a built-in implementation of EventHandler which sets up each method with a default implementation, // you can compose it with your own implementation of EventHandler when you don't want to implement all methods // in EventHandler. - EventServer struct { - } + EventServer struct{} ) // OnInitComplete fires when the server is ready for accepting connections.