Tag go
29 bookmarks have this tag.
29 bookmarks have this tag.
We are adding a new generated code API to Go Protobuf.
DevCrowd вместе с Авито провели исследование рынка Go-разработчиков, 2024
Something like make
, but magefiles are written in Go instead. Pretty funny.
Staticcheck - The advanced Go linter. Contribute to dominikh/go-tools development by creating an account on GitHub.
Никита рассказывает про оптимизации в Го.
Треш, конечно. Язык приколов
In many other languages, you have to not only evaluate testing libraries, but also write your tests in a style that complies with that library’s expectations. Gophers are blessed to have a thoroughly adequate solution out-of-the-box, and even further blessed to have an active ecosystem where folks are making in-depth testing a walk in the park.
Fast, powerful, yet easy to use template engine for Go. Optimized for speed, zero memory allocations in hot paths. Up to 20x faster than html/template
package src
type config struct {
// Required
foo, bar string
// Optional
fizz, bazz int
}
// Each optional configuration attribute will have its own public method
func (c *config) WithFizz(fizz int) *config {
c.fizz = fizz
return c
}
func (c *config) WithBazz(bazz int) *config {
c.bazz = bazz
return c
}
// This only accepts the required options as params
func NewConfig(foo, bar string) *config {
// First fill in the options with default values
return &config{foo, bar, 10, 100}
}
func Do(c *config) {}
You’d use the API as follows:
package main
import ".../src"
func main() {
// Initialize the struct with only the required options and then chain
// the option methods to update the optional configuration attributes
c := src.NewConfig("hello", "world").WithFizz(0).WithBazz(42)
src.Do(c)
}
By wrapping errors and building well-formatted error messages, we can keep better track of where errors are happening. I often just add the name of the function being called to my error messages, but we can make the message say whatever we want. For example, I’ll often include parameter information in the error so I know which inputs caused the error.
В этом посте рассматривается широкий спектр тем, связанных с созданием сервисов на Go:
Структурирование серверов и обработчиков с расчётом на максимальное удобство поддержки;
Советы и рекомендации по оптимизации сервисов под быстрый запуск и правильное отключение;
Обработка стандартных задач, применимых ко множеству типов запросов;
Глубокое исследование правильного тестирования сервисов.
Thanks to generics, there are some interesting new ways to program in Go. This article explains how we can use functional programming techniques like Map, Filter, and Reduce, and what kind of problems they might help us to solve.
Concurrency is the key to designing high performance network services. This talk expands on last year's popular Go Concurrency Patterns talk to dive deeper into Go's concurrency primitives, and see how tricky concurrency problems can be solved gracefully with simple Go code.
Gio is an open source library for creating portable, immediate mode GUI programs for Android, iOS, Linux, Windows, macOS.
A linter for Go that finds nil panics. It found several potential nil panic in Betula and Mycorrhiza codebases that I didn't bother fixing.
Functions that are part of your project’s source code but can never be
reached in any execution are called “dead code”, and they exert a drag
on codebase maintenance efforts.
Today we’re pleased to share a tool named deadcode to help you identify them.
Go developers said they are more interested in AI/ML tooling that improves the quality, reliability, and performance of code they write, rather than writing code for them. An always-awake, never-busy expert “reviewer” might be one of the more helpful forms of AI developer assistance.
The top requests for improving toolchain warnings and errors were to make the messages more comprehensible and actionable; this sentiment was shared by developers of all experience levels, but was particularly strong among newer Go developers.
Our experiment with project templates (gonew) appears to solve critical problems for Go developers (especially developers new to Go) and does so in a way that matches their existing workflows for starting a new project. Based on these findings, we believe gonew can substantially reduce onboarding barriers for new Go developers and ease adoption of Go in organizations.
Three out of every four respondents work on Go software that also uses cloud services; this is evidence that developers see Go as a language for modern, cloud-based development.
Developer sentiment towards Go remains extremely positive, with 90% of survey respondents saying they felt satisfied while working with Go during the prior year.
This page collects common comments made during reviews of Go code, so
that a single detailed explanation can be referred to by shorthands.
This is a laundry list of common style issues, not a comprehensive style guide.
The Go standard library is full of bad design choices from the perspective of safety of use.
Choosing the right tools to write a database model in Go can be overwhelming. This post describes the various approaches.