企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
~~~ func Fetch(url string) { resp, err := http.Get(url) if err != nil { panic(err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { fmt.Printf("wrong status code, %d\n", resp.StatusCode) } all, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println(string(all)) } ~~~