Best of GolangMay 2023

  1. 1
    Article
    Avatar of hnHacker News·3y

    Chris James -HTMX is the Future

    A new approach is to put the ability to deliver this UX back into the hands of engineers that built websites before the SPA-craze. The costs of SPA SPAs have allowed engineers to create some great web applications, but they come with a cost: Hugely increased complexity.

  2. 2
    Article
    Avatar of dhhDavid Heinemeier Hansson·3y

    How to recover from microservices

    The worst form of microservices madness is when you splinter a single, coherent flow across multiple systems. When microservices are done right, they often target a narrow, isolated, and usually performance-critical segment of the system. The vast majority of systems should have no more than two backend languages in play at any one time.

  3. 3
    Article
    Avatar of medium_jsMedium·3y

    Learn Go Programming: Fast and Easy Basics for Beginners

    Go programming is a programming language known for its simplicity, speed, and concurrency. This post provides an easy and enjoyable way to learn Go programming. It covers topics such as hello world, variables, functions, packages, control structures, arrays, slices, maps, structs, pointers, and more. If you're looking to learn Go programming, this post is a great starting point.

  4. 4
    Article
    Avatar of communityCommunity Picks·3y

    How Much Memory Do You Need to Run 1 Million Concurrent Tasks?

    This post compares the memory consumption of asynchronous and multi-threaded programming in popular languages. It provides benchmark programs in Rust, Go, Java, C#, Python, Node.js, and Elixir. The comparison reveals that different language runtimes have varying trade-offs when it comes to memory consumption for a high number of concurrent tasks.

  5. 5
    Article
    Avatar of communityCommunity Picks·3y

    Golang Functional Options Pattern

    The Go (Golang) Functional Options Pattern is a way to structure structs in Go for configuration and initialization. Different approaches like declaring new constructors and using a custom Config struct are discussed. The Functional Options Pattern is presented as a better alternative with its flexibility and expressive design.

  6. 6
    Article
    Avatar of medium_jsMedium·3y

    The Way of Interface in Go

    interfaces are custom types that define a set of function signatures. By design, interfaces are considered to be tools that make code clean, short and provide a good API between packages, servers and clients. Many times Go interfaces are used to force encapsulation and allow for a versatile, clean and short code base.

  7. 7
    Article
    Avatar of medium_jsMedium·3y

    How to deploy your Golang project on Kubernetes

    Learn how to deploy a Golang project on Kubernetes using Gin-Gonic as the framework. The post covers the installation of Golang, Docker, and Kubernetes, as well as the creation of a webserver and Dockerizing the project. It also explains how to deploy the project on Kubernetes and access the Minikube dashboard.

  8. 8
    Article
    Avatar of medium_jsMedium·3y

    Message Queue for Publisher/Subscriber (pub/sub) Scenarios with Go Practice

    Message Queue for Publisher/Subscriber (pub/sub) Scenarios with Go Practice. Here’s an example of how you can use a message queue in Go to implement a simple pub/sub scenario using the messaging system. RabbitMQ is known for its simplicity and ease of use.

  9. 9
    Article
    Avatar of medium_jsMedium·3y

    Mocking your Way into Go Generics

    Pegomock supports Go Generics in its new release. Before generics, we had to generate matchers for custom types, and would generate lots of functions like. To generate a mock, in a terminal we can now run: This will give us a new struct type and a function.

  10. 10
    Article
    Avatar of itnextITNEXT·3y

    Configuration Management in Go

    Viper is a powerful and highly configurable library for managing application configuration in Go. It allows engineers to work with multiple configuration sources, including files, environment variables, command-line flags, and remote key-value stores. Viper can also unmarshal the configuration data into a custom structure.