Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamsher31/goisredirect
Check if a number is a redirect HTTP status code
https://github.com/shamsher31/goisredirect
Last synced: 4 days ago
JSON representation
Check if a number is a redirect HTTP status code
- Host: GitHub
- URL: https://github.com/shamsher31/goisredirect
- Owner: shamsher31
- License: mit
- Created: 2015-08-17T18:27:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-18T05:38:28.000Z (about 9 years ago)
- Last Synced: 2024-06-21T12:48:36.174Z (5 months ago)
- Language: Go
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# goisredirect
Check if a number is a redirect HTTP status code### How to install
```go
go get github.com/shamsher31/goisredirect
```### How to use
```go
package mainimport (
"fmt"
"github.com/shamsher31/goisredirect"
)func main() {
fmt.Println(redirect.Is(300))
// true
}
```
###Aliasing Imports
If you already have package name ```redirect``` you can use following.
```go
package mainimport (
"fmt"
pckRedirect "github.com/shamsher31/goisredirect"
)func main() {
fmt.Println(pckRedirect.Is(401))
// false
}
```### Related
[goisvdo](https://github.com/shamsher31/goisvdo)
[goistext](https://github.com/shamsher31/goistext)
[goisimg](https://github.com/shamsher31/goisimg)### Why
This package is inspired by [is-redirect](https://www.npmjs.com/package/is-redirect) npm module.### License
MIT © [Shamsher Ansari](https://github.com/shamsher31)