Skip to content

harperreed/gobitly

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Go Bitly client

Go client for bitly.com

Forked from https://github.com/str1ngs/go-bitly. Modified to work in my own projects.

###Example:

package main

import (
	"fmt"
	"github.com/harperreed/gobitly/bitly"
)

func main() {
	bitly.SetUser("username")
	bitly.SetKey("xxxxx")
	long_url := "https://github.com/harperreed/gobitly"
	short_url, error := bitly.Shorten(long_url)
	fmt.Printf("Your long url is: %q\n", long_url)

	if error == nil {
		fmt.Printf("Your short url is: %q\n", short_url)

	}

}

###Installation

$ go get github.com/harperreed/gobitly/bitly

###Usage

$ go run example.go
Your long url is: "https://github.com/harperreed/gobitly"
Your short url is: "http://gg.ly/Rpit3X"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%