Skip to content

How to compare two different struct functions results in Golang

Notifications You must be signed in to change notification settings

arturoaviles/golang-interfaces-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Golang Interfaces

This repo shows how interfaces can be used to compare the value of different struct functions.

Problem

We have a Rock struct and Water struct. Both have a Density Function and we need to compare both things.

Solution

Check 2_solution.go

Another example

3_myown.go

About

How to compare two different struct functions results in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages