From be3857cf6d265c29ecf5911f7ceebdfb61b08233 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 25 Jun 2025 09:52:32 -0300 Subject: [PATCH] fix: gitignore, crush.md --- .gitignore | 1 + CRUSH.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 CRUSH.md diff --git a/.gitignore b/.gitignore index 84b73d40dd60c7936fc894039e356439f00e6769..11bbf384b3ceeb76016096c858f821fbba1d335e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ go.work.sum # crush .crush +dist/ diff --git a/CRUSH.md b/CRUSH.md new file mode 100644 index 0000000000000000000000000000000000000000..3f07425edf624db22b3e634c182c8320960c40a4 --- /dev/null +++ b/CRUSH.md @@ -0,0 +1,22 @@ +# Fur - AI Provider Database + +## Build/Test Commands +- `go build` - Build the main HTTP server +- `go build ./cmd/openrouter` - Build OpenRouter config generator +- `go test ./...` - Run all tests +- `go test -run TestName ./pkg/...` - Run specific test +- `go run main.go` - Start HTTP server on :8080 +- `go run ./cmd/openrouter/main.go` - Generate OpenRouter config + +## Code Style Guidelines +- Package comments: Start with "Package name provides/represents..." +- Imports: Standard library first, then third-party, then local packages +- Error handling: Use `fmt.Errorf("message: %w", err)` for wrapping +- Struct tags: Use json tags with omitempty for optional fields +- Constants: Group related constants with descriptive comments +- Types: Use custom types for IDs (e.g., `InferenceProvider`, `Type`) +- Naming: Use camelCase for unexported, PascalCase for exported +- Comments: Use `//nolint:directive` for linter exceptions +- HTTP: Always set timeouts, use context, defer close response bodies +- JSON: Use `json.MarshalIndent` for pretty output, validate unmarshaling +- File permissions: Use 0o600 for sensitive config files \ No newline at end of file