2
0

4 Commits

Author SHA1 Message Date
Bo-Yi Wu 9246475528 refactor: refactor codebase for improved performance and maintainability
- Simplify variable initialization in `decode` method
- Correct method call in `WriteString` function

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-04-08 08:39:14 +08:00
Bo-Yi Wu c719ab6b53 chore: improve linting and error handling across the codebase
- Update golangci-lint-action to version 7 in GitHub workflow
- Specify version 2.0 for golangci-lint-action in GitHub workflow
- Set golangci-lint configuration version to "2"
- Enable specific linters and disable default linters in golangci configuration
- Add exclusions and formatters configurations in golangci configuration
- Replace deprecated `ioutil.ReadAll` with `io.ReadAll` in sse-decoder.go
- Use grouped variable declaration for `contentType` and `noCache` in sse-encoder.go
- Add error handling for `WriteString` operations in sse-encoder.go
- Add `nolint:exhaustive` comment for `kindOfData` switch statement in sse-encoder.go
- Adjust test assertions for better readability in sse_test.go
- Add error handling for `Encode` function calls in tests and benchmarks

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-04-08 08:38:00 +08:00
Manu Mtz.-Almeida ee05b128a7 Adds some comments 2016-01-26 19:01:36 +01:00
Manu Mtz-Almeida fe6ea2c8e3 Conforms to w3.org standard + experimental decoder 2015-07-15 20:48:05 +02:00