Esempio 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"))
}
Esempio n. 2
0
File: main.go Progetto: 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)

}
Esempio 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...)
}