# Application Focused API Design

DevFeed: [Application Focused API Design](<https://devfeed.tech/articles/application-focused-api-design-22117.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2016/11/application-focused-api-design.html>)

Published: 2016-11-03T00:00:00Z

Content type: opinion

Language: en

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

Topics: [API](<https://devfeed.tech/topics/api.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Development](<https://devfeed.tech/topics/development.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [api-design](<https://devfeed.tech/tags/api-design.md>), [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [programming](<https://devfeed.tech/tags/programming.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

This article argues that Go package APIs should be designed around how application developers use them in their applications, rather than around the testing needs of those applications. It presents this approach as a way to keep APIs simpler, smaller, and more intuitive.

## Source excerpt

"I think it's ok to do heinous stuff to test an API if it makes it more usable by others." - Nate Finch Prelude If you are new to Go, it might help to read these posts first before continuing on with this post. https://www.ardanlabs.com/blog/2014/05/methods-interfaces-and-embedded-types.html https://www.ardanlabs.com/blog/2015/09/composition-with-go.html https://www.ardanlabs.com/blog/2016/10/reducing-type-hierarchies.html https://www.ardanlabs.com/blog/2016/10/avoid-interface-pollution.html Introduction Packages exists to help provide support for specific problems that are commonly found in the different applications we are building. A package API should be intuitive and simple to use so application developers can focus on their concerns and hopefully develop their applications faster. Tests are an artifact of development and exist to make sure the code we are writing has integrity before it is published. Tests are not a part of the application. They do not get built with the application and none of that code runs when the application is running.