Skip to content

ferhatelmas/httpclass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpclass

Godoc Build Status

Returns the class of a HTTP status code.

Install

go get github.com/ferhatelmas/httpclass

Usage

import "github.com/ferhatelmas/httpclass"

httpclass.Get(http.StatusOK)
//=> httpclass.Success, nil

httpclass.Get(http.StatusBadRequest)
//=> httpclass.ClientError, nil

httpclass.Get(0)
//=> Informational, "Wrong status code 0"

License

MIT © ferhat elmas

About

Get class of a HTTP code

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages