All Projects → shgopher → short

shgopher / short

Licence: MIT license
URL shortening service. 高性能短链接服务。

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to short

Micro
go-micro 微服务实践,更多请关注Micro中国站☞
Stars: ✭ 383 (+2635.71%)
Mutual labels:  k8s, go-micro
cookiecutter-go
boilerplate, golang project starter tool, support go-zero/go-micro/gin
Stars: ✭ 63 (+350%)
Mutual labels:  gin, go-micro
go2sky-plugins
The plugins of go2sky
Stars: ✭ 46 (+228.57%)
Mutual labels:  gin, go-micro
micro-starter
Micro 微服务实践
Stars: ✭ 391 (+2692.86%)
Mutual labels:  k8s, go-micro
Cinema
使用 go-micro 微服务框架开发的电影院订票系统
Stars: ✭ 140 (+900%)
Mutual labels:  gin, go-micro
gmsec
golang micro service base on gin. golang 微服务集成框架
Stars: ✭ 141 (+907.14%)
Mutual labels:  gin, go-micro
covid19-kerala-api-deprecated
Deprecated - A fast API service for retrieving day to day stats about Coronavirus(COVID-19, SARS-CoV-2) outbreak in Kerala(India).
Stars: ✭ 14 (+0%)
Mutual labels:  gin
hpay
a personal payment applet implemented using the gin framework
Stars: ✭ 71 (+407.14%)
Mutual labels:  gin
gapp
go gin应用
Stars: ✭ 42 (+200%)
Mutual labels:  gin
ververica-platform-k8s-operator
Kubernetes Operator for the Ververica Platform
Stars: ✭ 28 (+100%)
Mutual labels:  k8s
tailing-sidecar
tailing sidecar - the cluster-level logging agent for Kubernetes
Stars: ✭ 25 (+78.57%)
Mutual labels:  k8s
multi-master-kubernetes
Multi-master Kubernetes cluster on Exoscale
Stars: ✭ 65 (+364.29%)
Mutual labels:  k8s
kserve
Serverless Inferencing on Kubernetes
Stars: ✭ 1,621 (+11478.57%)
Mutual labels:  k8s
go-gin-app
Fork from https://github.com/demo-apps/go-gin-app.git
Stars: ✭ 15 (+7.14%)
Mutual labels:  gin
popcat-echo
The server-side reproduction, similar the one of https://popcat.click, improve the performance and speed.
Stars: ✭ 62 (+342.86%)
Mutual labels:  gin
namespace-provisioner
A Kubernetes operator creating K8s resources by annotating namespaces
Stars: ✭ 52 (+271.43%)
Mutual labels:  k8s
Kubernetes-and-Cloud-Native-Associate-KCNA
Useful notes for the KCNA - Kubernetes and Cloud Native Associate
Stars: ✭ 162 (+1057.14%)
Mutual labels:  k8s
laravel-php-k8s
Just a simple port of renoki-co/php-k8s for easier access in Laravel
Stars: ✭ 71 (+407.14%)
Mutual labels:  k8s
Java-CS-Record
记录准备春招实习过程中,学习与复习的知识(模块化整理,非面试题速成)。注:暂停更新,后续请移步博客
Stars: ✭ 73 (+421.43%)
Mutual labels:  rocketmq
angular-app-kubernetes
Sample Dockerised angular app deployed on Kubernetes on Azure using AKS
Stars: ✭ 42 (+200%)
Mutual labels:  k8s

short

Goproxy.cn

Use murmur hash function.

URL shortening service.

Usage

example

package main

import (
	"fmt"
	"github.com/golang/glog"
	"github.com/googege/short"
	"os"
)

var (
	path    = "https://t.cn/"
	longURL = "https://github.com/googege/GOFamily/blob/master/%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/%E7%AE%97%E6%B3%95/%E7%AE%97%E6%B3%95%E9%A2%98/leetcode/1.md"
)

func main() {
	db := short.NewMapDB()
	// add db engine to short.
	s := short.NewShort(db)
	//
	shortURL, err := s.ShortAdd(longURL)
	if err != nil {
		glog.Error(err)
	} else {
		fmt.Println(shortURL)
	}
	//
	longURL, err = s.ShortFind(path + shortURL)
	// if http
	//http.Redirect(nil,nil,longURL,302
	//)
	if err != nil {
		glog.Error(err)
	} else {
		fmt.Println("longURL:", longURL)
	}
	//
	shortURL, err = s.ShortFind("a")
	if err != nil {
		glog.Error(err)
	} else {
		fmt.Println("short: ", shortURL)
	}
	//
	file, err := os.Getwd()
	if err != nil {
		glog.Error(err)
	}
	if err = s.SetQR(path, 256, file+"/text.png"); err != nil {
		glog.Error(err)
	}
}

HERE

items description
aliyun vps aliyun vps,China's largest cloud computing manufacturer, the world's top 5 cloud computing service providers
VPS vps fast and cheap just 2-3.75$/mo
WeChat public account 微信公众号 p
My bilibili b站 b
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].