# Interfaces 101 : Determine LOC with io.Writer Ep. 5

DevFeed: [Interfaces 101 : Determine LOC with io.Writer Ep. 5](<https://devfeed.tech/articles/interfaces-101-determine-loc-with-io-writer-ep-5-22212.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/02/interfaces-101-determine-loc-with-iowriter.html>)

Published: 2023-02-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [IO](<https://devfeed.tech/topics/io.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interface-implementation](<https://devfeed.tech/tags/interface-implementation.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [io](<https://devfeed.tech/tags/io.md>), [io-writer](<https://devfeed.tech/tags/io-writer.md>), [stringer](<https://devfeed.tech/tags/stringer.md>), [video](<https://devfeed.tech/tags/video.md>), [writer](<https://devfeed.tech/tags/writer.md>)

## AI overview

A video tutorial demonstrates how to implement a Go interface using a type alias, pass a variable as an interface to a function, and repurpose the interface to count lines of code with io.Writer.

## Source excerpt

Introduction In episode 4, Miki defined an enumerated type that satisfied Go's fmt.Stringer interface. By implementing the fmt.Stringer interface, Miki can specify how his enumerators were printed within a formatted string and in this case, he expected the values to be displayed as a predetermined text value. Miki also pointed out how using the value of the method's receiver within the Stringer method can result in a recursive loop.