コード例 #1
0
ファイル: handler.go プロジェクト: peter-edge/flights-go
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
ファイル: escape.go プロジェクト: ZeusbasePython/appscale
// 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...)
}