Exemplo n.º 1
0
func joinSegmentsGCMap(segments []*openflights.GetMilesResponse_Segment) string {
	segmentStrings := make([]string, len(segments))
	for i, segment := range segments {
		segmentStrings[i] = fmt.Sprintf("%s-%s", segment.SourceAirportId, segment.DestinationAirportId)
	}
	return template.URLQueryEscaper(strings.Join(segmentStrings, "\r\n"))
}
Exemplo n.º 2
0
Arquivo: main.go Projeto: anykao/p
func main() {
	flag.Parse()

	url := template.URLQueryEscaper(flag.Args())

	url = fmt.Sprintf("http://52.68.184.19:8080/search/%s", url)

	fmt.Printf("open %s\n", url)

	open.Start(url)

}
Exemplo n.º 3
0
// URLQueryEscaper returns the escaped value of the textual representation of
// its arguments in a form suitable for embedding in a URL query.
func URLQueryEscaper(args ...interface{}) string {
	return template.URLQueryEscaper(args...)
}