Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Category: Tech

Inner Working or Internals of an Interface in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

Overview Like any other variable, an interface variable is represented by a type and value. Interface value, in turn under the hood consists of two tuple Underlying Type Underlying Value See below…

Print underlying type and value of an interface in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

Overview Golang provides format identifiers to print the underlying type and underlying value represented by the interface value. %T can be used to print the concrete type of the interface value %v…

Type Implementing multiple interfaces in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

Overview A type implements an interface if it defines all methods of an interface. If that type defines all methods of another interface then it implements that interface. In essence, a type…

Interfaces are implemented implicitly in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

There is no explicit declaration that a type implements an interface. Infact, in Go there doesn’t exist any “implements” keyword similar to Java.  A type implements an interface if it implements all…

Declaring and Implementing an interface in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

Overview Interface is a type in Go which is a collection of method signatures. These collection of method signatures are meant to represent a behaviour. The interface declares only the method set…

Pointer vs Value Receiver in methods while implementing an interface in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

A method of a type can either have a pointer receiver or a value receiver. There is a caveat while pointer vs value receiver for methods of a type when that type…

Benefits of Interface in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

Below are some benefits of using interface. Helps write more modular and decoupled code between different parts of the codebase – It can help reduce dependency between different parts of the codebase…

Interface Comparison in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

For understanding whether two interface variables are equal or not, we first need to understand the internal representation of an interface. Like any other variable, an interface variable is represented by a…

Embedding Interfaces in Go (Golang)

Posted on July 18, 2020July 18, 2020 by admin

An interface can be embedded in another interface as well as it can be embedded in a struct. Let’s look at each one by one Embedding interface in another interface An interface…

Interface in Go (Golang)

Posted on July 18, 2020August 7, 2021 by admin

This is the  chapter 21 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – IotaPrevious Tutorial – Method Now let’s check…

Posts pagination

Previous 1 … 35 36 37 … 62 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme