42 Commits

Author SHA1 Message Date
095c69c424 fix(cmd/gf): fix gf env and gf build --dumpEnv command error (#4635)
## Summary
- Fix `gf env` and `gf build --dumpEnv` command failing when `go env`
outputs warning messages
- When `go env` outputs warnings (e.g., invalid characters in
environment variables), it returns non-zero exit code but still provides
valid output
- The original code would fail in this case

## Changes
- Only fail when `go env` returns empty output, allow non-zero exit code
with valid output
- Skip lines that don't match `key=value` format instead of failing with
Fatal error
- Add debug log for skipped lines to help troubleshooting
- Add unit tests for env command

## Related Issue
Fixes #4469

## Test plan
- [x] `gf env` command works correctly even when `go env` outputs
warnings
- [x] `gf build --dumpEnv` works correctly
- [x] Added unit tests pass
2026-01-21 19:15:57 +08:00
7ffdff37e4 chore: upgrade golangci-lint configuration and optimize codebase (#4236)
This PR includes the following changes:

- **Upgrade `.golangci.yml`**: Updated the configuration file to align
with the latest golangci-lint version, ensuring compatibility and
leveraging new features.
- **Refactor GitHub Action workflow**: Modified `golangci-lint.yml` in
the GitHub Actions workflow to reflect the updated configuration and
improve CI performance.
- **Codebase optimization**: Refactored code to address issues and
warnings raised by the updated golangci-lint rules, including:
  - Improved function length and complexity.
  - Enhanced error handling and variable naming conventions.
- Fixed minor issues such as unused imports and formatting
inconsistencies.

These changes aim to maintain code quality, ensure compatibility with
the latest tools, and improve overall maintainability.
2025-08-22 13:29:09 +08:00
bc1e1019c5 refract(util/gconv): change Converter interface definition for more convenient usage (#4202) 2025-03-14 18:23:07 +08:00
2d3ab4f9fb feat: add submodule examples (#4137) 2025-02-27 14:35:00 +08:00
5af342adc3 fix(net/ghttp): json omitempty takes no effect in BuildParams, which is not compatible with old version (#4041) 2024-12-13 09:29:19 +08:00
f45f64897a fix(cmd/gf): creating logic.go empty folder when there is no correct logic service (#3815) 2024-09-28 11:28:06 +08:00
56ef0c0735 fix issue command gf run -w takes no effect (#3321) 2024-02-27 20:33:57 +08:00
2433b2ce99 ignore cmd/gf/go.work.sum from version controll (#3087) 2023-10-25 21:17:21 +08:00
f1b5a223bf add go workspace for cmd/gf, to enable go install for cmd/gf (#3040) 2023-10-18 20:01:16 +08:00
21ebf48072 .gitignore updates (#2426) 2023-02-07 21:13:20 +08:00
0a76b9c61b fix invalid UpdatedAt usage in soft deleting feature for package gdb (#2323) 2022-11-24 21:23:15 +08:00
2598745e50 fix issue #1971 (#2203)
Co-authored-by: houseme <housemecn@gmail.com>
2022-10-14 10:10:27 +08:00
cdd4473df5 improve command gen service; add error trace for error of some packages 2022-06-16 17:07:25 +08:00
bd7ec5d0b0 Feature/sqlite ut (#1882) 2022-06-06 19:57:53 +08:00
6d0b4faeb0 gitignore updates 2022-05-12 16:01:55 +08:00
7fc75bfeff improve ignore and up websocket 1.5.0 2022-03-19 16:16:18 +08:00
aa6705f493 improva gf cli, package gcfg 2022-02-22 17:42:40 +08:00
76b819ae3b move gf cli and gdb drivers into gf repo. 2022-01-24 14:41:23 +08:00
67a479a2cd remove .example 2021-11-16 21:37:59 +08:00
012121ea77 gf cli updates 2021-06-30 20:00:50 +08:00
48d840a1b8 ad go.sum 2021-03-18 15:29:42 +08:00
Leo
b97e397354 Fix typo in gitignore 2020-06-22 09:41:02 +08:00
d9c5182d1a gitignore updates 2020-06-04 17:56:32 +08:00
51d9fe5253 add AllowDomain option for ghttp.CORS; add IsSubDomain function for gstr; improve grand.Intn 2019-09-23 19:25:03 +08:00
06c16bf560 remove thirdparty diectory, add go.mod for package dependences 2019-08-01 14:07:25 +08:00
39bd2616c4 add go.sum to gitignore 2019-06-30 22:22:24 +08:00
58a405bfa8 add package gerror; improve internal/debug,glog package 2019-06-29 18:17:33 +08:00
05c7ba5f29 improve ghttp.CORSDefault 2019-06-24 19:05:07 +08:00
101d095f45 GF greets you. 2018-12-04 20:28:06 +08:00
b190ee9fe6 初步完成第一阶段的性能改进 2018-11-17 02:39:23 +08:00
9bb1125169 增加go modules支持 2018-10-19 17:21:30 +08:00
576b6da0f5 修复ghttp.Server日志路径丢失问题 2018-09-14 22:07:19 +08:00
1ac39cd2e0 rm .DS_Store 2018-08-08 13:53:24 +08:00
2e0d8f8f48 去掉monitor功能 2017-09-06 16:39:19 +08:00
63bb373e46 初步完成gluster0.6版本开发 2017-09-04 16:21:27 +08:00
8fc6df4d3b gluster开发 2017-08-29 16:41:20 +08:00
ad1d4e9f18 忽略文件更新 2017-07-06 17:56:04 +08:00
1f0e37b653 库文件整理 2017-06-30 16:53:54 +08:00
4516451a94 库文件整理 2017-06-30 16:53:41 +08:00
9854c1ea79 库文件整理 2017-06-30 16:52:51 +08:00
a3b66cd317 开发 2017-06-30 16:47:41 +08:00
cb516bcd45 项目初始化 2017-06-29 17:29:43 +08:00