Johnson Ojoopyjo.hashnode.dev·Nov 18, 2023Understanding Go Interfaces: A Guide for BeginnersHey there! Today, we're going to dive into the world of Go programming, specifically focusing on a concept that might sound intimidating at first: interfaces. But worry not! I'll break it down into simple terms, much like explaining how a universal r...1 like·119 readsGo Language
SHIVANI GANIMUKKULAshivanig.hashnode.dev·Oct 24, 2023Unit Testing in Go using GoMocksGoMocks Mocking may sound a little bit tedious and time-consuming at first, but can be implemented easily with the help of a pre-existing mocking framework. By mocking the API, you can validate all the functionality of your application without the pe...1 like·263 readsgomock
Taylor Browndumpster.hashnode.dev·Sep 24, 2023Using Interfaces in GoLearning how to use interfaces in Go will help you write flexible and simpler code. When I was first learning Go I found the posts about interfaces to be lacking. The examples weren't practical (Stringer, Geometry, Animal - these posts are great, but...2 likes·1.8K readsgolang
Diwakardiwakarkashyap.hashnode.dev·Aug 29, 2023Interfaces and Embedding in Golang (Go)1. Interfaces in Go: 1.1. What are Interfaces? In Go, an interface is a type that specifies a set of method signatures. When a concrete type provides definitions for all the methods in an interface, it is said to implement the interface. 1.2. Definin...10 likes·33 readsGo Language
Sidharthan Chandrasekaran Kamarajthebugshots.dev·Aug 24, 2023Flexible Caching in Go with InterfacesCaching is a common technique in programming to improve performance by storing expensive computations or IO results for fast lookup. In this post, we'll look at how Go's interfaces enable building flexible and extensible caches. Defining a Cache Inte...118 readsGolanggolang
averageDevaveragedev717.hashnode.dev·Aug 17, 2023Interfaces in GoAccording to https://go.dev/tour/methods/9, an interface is a collection of method signatures. type Shape interface{ area() float64 } As you can see in the above code snippet, I define Shape which is an interface and simply put a method(you can ...Go Language
Ujjawal Srivastavaxeromola.hashnode.dev·Mar 25, 2023Understanding Interfaces in GoLet's just get right into it. Understanding Interfaces Think of interfaces as a set of behaviours. When someone or something implements this interface they define this set of behaviours on itself. For example, let's consider an interface Organism. No...145 readsGolang-Basicsgolang
Yusuf Akinleyeayaacodes.hashnode.dev·Feb 8, 2023Merging Maps in Go: A Step-by-Step GuideIntroduction Go is an open-source programming language. It uses a statically typed system, which requires the declaration of variable types at compile-time and generates more efficient machine code; this eliminates the need to check types at runtime ...1 like·1.6K readsGo Language
Ashok Vangablock360.hashnode.dev·Nov 10, 2022Interfaces & Methods - Composition in GoIn Go, Interfaces are named collections of method signatures. Similar to Java, you just declare methods Since there is no class in Go, we need to use "structs" Go does not support inheritance in its type system, but it supports composition of types ...44 readsGo HackHouseInterfaces Go
Ashwin Gopalsamyashwingopalsamy.hashnode.dev·Oct 29, 2022Understanding Interfaces in GoAs someone who's worked and learned various programming languages, I’ve encountered interfaces in many forms. When I finally started using Go, I was intrigued by how its approach to interfaces could streamline my coding experience. Let’s break down w...Go Programming Languagegolang