|
π Stories, Tutorials & Articles |
|
|
|
How "go test" runs tests |
|
|
When the go test command is run with a specific package specified (e.g. go test ./foo), the Go toolchain performs several steps to run the tests for that package. It skips intermediate preparation steps such as parsing command line flags and checking for cached results, and generates a package main that runs all TestXxx functions for the package. This package main is then compiled into a testing binary that is executed, setting the current working directory to the path of the original package. This process allows for the isolated testing of a specific package.
|
|
|
|
|
|
|
How to use NextJS with Golang |
|
|
This guide provides instructions on how to set up a scalable, high-performance backend using the Go programming language and a fast-loading frontend using the NextJS framework. It first explains how to install NodeJS and Go, and then walks through the process of creating the project structure and setting up a simple Go HTTP server and a NextJS app. It also covers how to connect the frontend and backend and deploy the project to a server. The guide includes code snippets and terminal commands to help users follow along and set up their own Go and NextJS project.
|
|
|
|
|
|
|
Benchmarking SQLite Performance in Go β
|
|
|
SQLite has a reputation of being a toy database useful only for hobby projects and integration tests. The author shows us why this is not true, with data to back it up. |
|
|
|
|
|
|
Fast embedded templates in Go with quicktemplate |
|
|
The quicktemplate is a Go library that allows users to create templates that are converted into Go code and then compiled into the binary. This can be useful for generating HTML for web applications and allows for templates to be bundled within the binary, eliminating the need to manage additional files. The templates are written in a specific syntax and are then compiled by the qtc compiler. In addition to generating templates, the library also allows for template inheritance and composition.
|
|
|
|
|
|
|
The Go libraries that never failed us: 22 libraries you need to know β
|
|
|
This article presents a list of Go libraries that the author and their team have found useful in various projects, including complex financial, health, and security projects. The libraries are organized into categories such as HTTP, routers, middlewares, and testing, and the author provides recommendations on which libraries to use for different types of projects. The article also includes non-obvious uses for the libraries and common anti-patterns to avoid. The purpose of the article is to provide a curated list of high-quality and battle-tested Go libraries that can save readers time in finding the right tools for their projects. |
|
|
|
|