crvcrv / go-interface-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-interface-examples

Some examples of using Go interfaces to make cleaner, more testable code.

local-interfaces example

See the code here

This is an example of defining your interfaces locally in each package rather than trying to do an "interface package" or providing giant interfaces from a single package that also contains the implementation.

About

License:MIT License


Languages

Language:Go 100.0%