Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Golang Snippets - Marine TechnologiesNew to Visual Studio Code? Get it now.
Golang Snippets - Marine Technologies

Golang Snippets - Marine Technologies

Marine Technologies Engineering

|
58 installs
| (0) | Free
Golang Snippets based on the Marine Technology Coding Convention
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Marine Technologies Golang Snippet

Snippet Name Description Prefix
REST API Controller Generates a REST API controller with a corresponding interface, facilitating the creation of controllers in Golang. rest-ctrl
REST API Map Request Body Creates code for mapping and parsing the request body in a Golang REST API, handling errors and returning appropriate responses. mapbody
REST API Map Query Params Generates code to map and handle query parameters in a Golang REST API, including error handling and response for invalid parameters. mapquery
REST API OK Response Creates code for generating a successful JSON response in a Golang REST API, with customizable status code, message, and data. jsonok
REST API Tracing Span Controller Generates code for creating a tracing span in a Golang REST API controller, enhancing observability and monitoring capabilities. span-ctrl
REST API Tracing Span Creates code for adding tracing spans to Golang REST API endpoints, facilitating monitoring and tracing of requests. span
Service Generates the basic structure for a Golang service, including the service interface, implementation struct, and initialization function. srv
Repository Generates the basic structure for a Golang repository, including the repository interface, implementation struct, and initialization function with a database connection. repo
Bun Transaction Generates code for executing a transaction using the Bun database library in Golang, handling errors and rolling back the transaction when necessary. newtx
REST API Route Generates code for defining a Golang REST API route, including HTTP method, route path, middleware for authorization, and the corresponding controller function. route
Test Suite Generates code for a Golang test suite, including setup, teardown, and test case functions, facilitating the organization and execution of integration tests. test-suite
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft