Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolas-sabbatini/go-short
This is the implementation of the second exercise of the Gophercises course
https://github.com/nicolas-sabbatini/go-short
go go-server go-sqlite3 golang golang-application gopher gophercises sqlite sqlite3 url-shortener
Last synced: about 1 month ago
JSON representation
This is the implementation of the second exercise of the Gophercises course
- Host: GitHub
- URL: https://github.com/nicolas-sabbatini/go-short
- Owner: nicolas-sabbatini
- Created: 2023-09-27T22:54:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-04T11:15:49.000Z (over 1 year ago)
- Last Synced: 2024-06-20T19:31:42.141Z (7 months ago)
- Topics: go, go-server, go-sqlite3, golang, golang-application, gopher, gophercises, sqlite, sqlite3, url-shortener
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO short
## Description
This is the implementation of the secong exercise of the [Gophercises](https://gophercises.com/) course.
The exercise is about creating a URL shortener.
The proyect has 3 binaris that can be used:
- `cmd/go-short/go-short.go`: This is the first exercice from the course a shorter handle from a YAML.
- `cmd/go-short-v2/go-short-v2.go`: This is the second exercice from the course a shorter handle from a JSON.
- `cmd/go-short-sql/go-short-sql.go`: This is the third exercice from the course a shorter handle from a Data base.
And has 2 packages:
- `pkg/url-short/url-short.go`: This package has the logic of the shortener from a static file.
- `pkg/sqlite-url-short/sqlite-url-short.go`: This package has the logic of the the shortener from a SQLitle.## Usage
```bash
go run {{binary option}}
```## Examples
```bash
go run cmd/go-short/go-short.go
```
```bash
go run cmd/go-short-v2/go-short-v2.go
```
```bash
go run cmd/go-short-sql/go-short-sql.go
```