This article is part of a group of articles Architecting go libraries for semantic versioning in which I am providing various patterns to help building Go libraries that can remain modular, and yet abide to semver. Let’s say you have the following partial implementation of an HTTP client. package client type Option interface { applyOption(*Client) } type clientOptionFunc func(*Client) func (f clientOptionFunc) applyOption(c *Client) { f(c) } type Client struct { hostname string } func NewCl...