Go (Golang) io.Seeker Interface



Go (Golang) io.Seeker Interface

Go (Golang) io.Seeker Interface

Go (Golang) io.Seeker Interface

In this episode we are going to have a look at one of the most overlooked interfaces in the Go io package: the io.Seeker interface. The io.Seeker interface is extremely useful when moving across a file or any io.Reader which we know the structure of. The io.Seeker allows us to move to a specific location of the file or of any io.Reader, allowing us to avoid reading unnecessary parts of the file in question. It can also be useful when rewinding a file and re-reading data more than one time from the same io.Reader.

io.Seeker – https://golang.org/pkg/io/#Seeker

Source Code – https://play.golang.org/p/eqvok0_VBIi

💼 Golang Cafe – https://golang.cafe
📬 Golang Cafe Jobs Newsletter – https://golang.cafe/newsletter
🐦 Golang Cafe Twitter – https://twitter.com/golangcafe
📣 Telegram Channel – https://t.me/golangcafe

Comments are closed.