FlameWar
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
nebiros@programming.dev to Golang@programming.dev · 2 years ago

Interface guards in Go

rednafi.com

external-link
message-square
0
fedilink
1
external-link

Interface guards in Go

rednafi.com

nebiros@programming.dev to Golang@programming.dev · 2 years ago
message-square
0
fedilink
I love Go’s implicit interfaces. While convenient, they can also introduce subtle bugs unless you’re careful. Types expected to conform to certain interfaces can fluidly add or remove methods. The compiler will only complain if an identifier anticipates an interface, but is passed a type that doesn’t implement that interface. This can be problematic if you need to export types that are required to implement specific interfaces as part of their API contract.
alert-triangle
You must log in or register to comment.

Golang@programming.dev

golang@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !golang@programming.dev

This is a community dedicated to the go programming language.

Useful Links:

  • Go Website
  • Effective Go
  • Go by Example
  • How to Start a Go Project

Rules:

  • Posts must be relevant to Go
  • No NSFW content
  • No hate speech, bigotry, etc
  • Try to keep discussions on topic
  • No spam of tools/companies/advertisements
  • It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 8 users / day
  • 8 users / week
  • 59 users / month
  • 188 users / 6 months
  • 1 local subscriber
  • 2.46K subscribers
  • 116 Posts
  • 145 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • RandomDevOpsDude@programming.dev
  • austin@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org