# healthcheck

Published articles for healthcheck.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Writing an HTTP handler function in Go

DevFeed: [Writing an HTTP handler function in Go](<https://devfeed.tech/articles/writing-an-http-handler-function-in-go-22210.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/01/writing-an-http-handler-function-in-go.html>)

Published: 2023-01-17T00: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>), [HTTP](<https://devfeed.tech/topics/http.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [API](<https://devfeed.tech/topics/api.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [docker](<https://devfeed.tech/tags/docker.md>), [function](<https://devfeed.tech/tags/function.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [handler](<https://devfeed.tech/tags/handler.md>), [healthcheck](<https://devfeed.tech/tags/healthcheck.md>), [http](<https://devfeed.tech/tags/http.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interface](<https://devfeed.tech/tags/interface.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [route](<https://devfeed.tech/tags/route.md>), [routing](<https://devfeed.tech/tags/routing.md>), [webservice](<https://devfeed.tech/tags/webservice.md>)

### AI overview

This video tutorial explains how Go function types can define API contracts and demonstrates implementing an HTTP handler function for a health check. It covers HandlerFunc parameters, routing the handler, and common pitfalls.

### Source excerpt

Introduction When an API requires implementation details from the user, many developers use an interface for help. However, another way to allow developers to provide implementation details for an API is to accept a function instead. Go supports declaring function types which can be used to define a contract similar to how interfaces define a contract. A good example of an API that uses functions over an interface is the HTTP package. The HTTP package has the user bind a handler function into different routes.