Skip to content

Instantly share code, notes, and snippets.

@metaldrummer610
Created January 7, 2026 17:04
Show Gist options
  • Select an option

  • Save metaldrummer610/1492464e5d677ed92db83d8434b982a2 to your computer and use it in GitHub Desktop.

Select an option

Save metaldrummer610/1492464e5d677ed92db83d8434b982a2 to your computer and use it in GitHub Desktop.

Gemini Added Memories

  • The user prefers using the 'buf' tool for Protobuf/gRPC management (linting, breaking change detection, and code generation) in their Go and Python projects.
  • The user prefers using the latest versions of libraries and tools. I should actively perform web searches to verify 'bleeding edge' methods and patterns rather than relying on potentially outdated internal knowledge.
  • The user strictly follows Inversion of Control (IoC). Dependencies must always be created outside the unit of code and injected (constructor injection) to facilitate mocking.
  • In Go files, the user prefers this specific order: 1) Struct Definition, 2) Constructor (e.g., NewService), 3) Public Methods, 4) Private Methods.
  • In Go, the user follows the 'Consumer-Driven Interface' pattern: define interfaces for dependencies locally at the top of the file, including only the specific methods used by that struct.
  • In Go, the user uses zerolog for logging. ctx context.Context must always be the first argument in methods requiring context. Tests must use t.Context(), never context.Background() or context.TODO().
  • The user follows this standard Go directory structure:
  • cmd/: Command entries (main packages).
  • internal/: Private code for the project.
  • pkg/: Publicly reusable code.
  • api/: Protobuf definitions and generated code.
  • infra/: Infrastructure-related code (Terraform, Helm).
  • Root: Scripts, Makefiles, and tool configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment