gitio

package module
v0.0.0-...-5e3f40d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2016 License: MIT Imports: 6 Imported by: 3

README

gitio GoDoc

This is a Go client for git.io.

Read more about git.io here.

Installation

$ go get github.com/xlab/gitio/...

Or grab a binary in the Releases section.

Usage

$ gitio -h
Usage: gitio <long url>
  -c, --code=""        A custom code for the short link, e.g. https://git.io/mycode
  -f, --force=false    Try to shorten link even if the custom code has been used previously.

$ gitio -c gitio.go https://github.com/xlab/gitio/blob/master/gitio.go
https://git.io/gitio.go

License

MIT

Documentation

Overview

Package gitio is a client for https://git.io URL shortener.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTaken

func CheckTaken(code string) (bool, error)

CheckTaken checks if the provided custom code has already been taken on git.io.

func Shorten

func Shorten(longURL, code string) (shortURL *url.URL, err error)

Shorten returns a short version of an URL, or an error otherwise. Please note that it's not guaranteed the code will be accepted by git.io, the random one may be used instead.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL