Using functional options instead of method chaining in Go - Calhoun.io

In Java, it is pretty common to see libraries that use method chaining (aka the builder pattern) to construct resources. For example, we might construct a user by doing something like: User user = new User.Builder() .name("Michael Scott") .email("michael@dundermifflin.com") .role(&#…