You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`config/`: Configuration handling (environment variables). Functions return errors instead of using global state or exiting.
36
37
-`crypto/`: Encryption and decryption logic.
37
38
-`fs/`: Filesystem utilities (includes `CopyFile` for backups).
38
39
-`prompt/`: Interactive CLI prompts (uses `golang.org/x/term` for passwords).
@@ -55,13 +56,14 @@ go test ./...
55
56
Unit tests are located in `*_test.go` files within their respective packages.
56
57
57
58
### CI/CD
58
-
-**GitHub Actions (`test.yml`)**: Automatically runs tests and `golangci-lint` on every push and PR to the `main` branch across Linux and macOS.
59
+
-**GitHub Actions (`test.yml`)**: Automatically runs tests and `golangci-lint`(v2) on every push and PR to the `main` branch across Linux and macOS. Uses `golangci-lint-action`.
59
60
-**Release Automation (`release.yml`)**: Uses **GoReleaser** to build and publish binaries when a `v*` tag is pushed.
60
61
61
62
## Tips for Agents
62
63
64
+
-**Error Handling:** All `internal` packages should return errors to the caller. Avoid `log.Fatal` or `os.Exit` inside libraries.
63
65
-**Encryption during Tests:** When writing tests that involve encryption, you'll need a password. Ensure salts are at least 32 characters long.
64
-
-**Temporary Files:**`mrs` creates a temporary directory for decrypted files during editing. This is cleaned up by `main.go` using a `defer` call to `fs.RemoveTempDir()`.
66
+
-**Temporary Files:**`mrs` creates a temporary directory for decrypted files during editing. This is cleaned up by `main.go` using a signal-aware cleanup routine.
65
67
-**Search Logic:** Search is performed on the first line of each secret by default. The `--full` flag enables searching the entire secret content.
66
68
-**Modern Go:** Avoid `io/ioutil`. Use `os` or `io` instead.
67
69
-**Term handling:** Use `golang.org/x/term` for terminal-related operations.
0 commit comments