Пример #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"))
}
Пример #2
0
Файл: main.go Проект: 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)

}
Пример #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...)
}