amikai / Dcard-URL-Shortener

Implement URL shortener with Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dcard-URL-Shortener

workflow checking

About The Project

This is Dcard's homework about implementing url shortener. This repository includes all the modules with the mono-repo architecture. Also, if you want to know more about this homework detail, you can refer to this spec.

(back to top)

Built With

The following are the packages used in this Golang project.

(back to top)

Getting Started

Before starting this program, please make sure that your docker is running.

Unit Testing

This project has unit tests with ginkgo framework for DAO and toolkit in pkg directory.

  1. Test whole project
    make dc.test
    
  2. Test pkg
    make dc.pkg.test
    

Style Check

This project uses golangci to check the style.

  1. Check whole project's style
    make dc.lint
    
  2. Check only modules' style
    make dc.internal.lint
    
  3. Check only pkg's style
    make dc.pkg.lint
    

Build Image

  1. Build shorten url api image
    make dc.image
    

(back to top)

Future Work

  1. This time, I only use google-uuid to simply generate shorten url. The next goal is to adopt a suitable shorten url algorithm.
  2. This implementation is kind of like image-to-url converter. So I want to extend this project to contain image-to-url converter in the future.

(back to top)

About

Implement URL shortener with Golang

License:MIT License


Languages

Language:Go 92.6%Language:Makefile 7.1%Language:Dockerfile 0.3%