modulepackage
0.0.0-20200428181800-84e9b637b06b
Repository: https://github.com/pankajkhairnar/goshort.git
Documentation: pkg.go.dev
# README
goShort
GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter
REST Endpoints
- [POST] - http://localhost:8080/create/ : It accepts POST form data with parameter "url" and returns json response with short URL
- [GET] - http://localhost:8080/{SHORT_CODE}/ : If SHORT_CODE is valid and found in db, request will be redirected to original long URL
- [GET] - http://localhost:8080/{SHORT_CODE}/json : If SHORT_CODE is valid and found in db the endpoint will return original url in json response
License
# Functions
No description provided by the author
Following method is used to generate alphanumeric incremental code, which will be helpful
for generating short urls
this function will return new code like, input > output
a > b, ax > ay, az > aA, aZ > a1, a9 > ba, 99 > aaa
it will create shortest alphanumeric code possible for using in url
*/.
No description provided by the author
No description provided by the author
No description provided by the author