09/11/19 00:33:06
Go part2
スレリンク(tech板:520番)
> 520 名前:デフォルトの名無しさん[sage] 投稿日:2009/11/18(水) 23:38:35
> よし
> 厨っぽいけど話のタネに並列ダウンローダでも書いてくれ
からの続きです。現在までの成果物
package "main"
import (
'os";
"http";
"fmt";
)
func main() {
//response, url, err := http.Get("URLリンク(www.example.com)");
response, _, _ := http.Get("URLリンク(www.example.com)");
fmt.Printf("Status: %s\n", response.Status);
fmt.Printf("StatusCode: %d\n", response.StatusCode);
fmt.Printf("Header: %v\n", response.Header);
// fmt.Printf("Body: %s\n", response.Body([0:50]); <- まちがい
}