func GetShortURL(url string) string {
	reqURL := "http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long=" + url
	if url == "" {
		return ""
	}
	var urlArr []map[string]interface{}
	body := GetRequestBody(reqURL)
	if err := json.Unmarshal(body, &urlArr); err != nil {
		return ""
	}
	return urlArr[0]["url_short"].(string)
}
GetShortURL get sina short url
package main
import (
	"github.com/biezhi/moe"
	"encoding/json"
	"log"
	"github.com/olekukonko/tablewriter"
	"os"
	"reflect"
	"sync"
	"net/http"
	"io/ioutil"
)
var (
	wg   sync.WaitGroup
	lock sync.Mutex
)
type BaseArticle struct {
	Title   string `json:"title,omitempty"`
	URL     string `json:"url,omitempty"`
	Content string `json:"content,omitempty"`
}
func ShowNews(q string) {
	tip := "loading all news..."
	url := "http://reader.one/api/all/hn,reddit,ph,dn,github,medium,lifehacker?limit=20"
	if q != "" {
		tip = "loading " + q + " ..."
		url = "http://reader.one/api/news/" + q + "?limit=20"
	}
	moe := moe.New(tip).Color(moe.Green).Start()
	body := GetRequestBody(url)
	var resp []BaseArticle
	if err := json.Unmarshal(body, &resp); err != nil {
		log.Fatalln("load news fail")
		return
	}
	items := mapToString(resp, "URL")
	shortUrls := shortURLItems(items)
	moe.Stop()
	render(resp, shortUrls)
}
func render(articles []BaseArticle, shortUrls map[string]*string) {
	table := tablewriter.NewWriter(os.Stdout)
	table.SetColWidth(70)
	table.SetHeader([]string{"Title", "URL"})
	table.SetAlignment(tablewriter.ALIGN_LEFT)
	table.SetBorder(false)
	table.SetHeaderColor(tablewriter.Colors{tablewriter.Bold, tablewriter.BgBlackColor},
		tablewriter.Colors{tablewriter.Bold, tablewriter.BgBlackColor})
	table.SetColumnColor(tablewriter.Colors{tablewriter.Bold, tablewriter.FgRedColor},
		tablewriter.Colors{tablewriter.Bold, tablewriter.FgBlueColor})
	for _, article := range articles {
		URL := shortUrls[article.URL]
		Title := article.Title
		row := []string{Title, *URL}
		table.Append(row)
	}
	table.Render()
}