💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
~~~ 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)) } ~~~