💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
~~~ package main import ( "fmt" "net/http" ) func main() { http.HandleFunc("/redirect", func(w http.ResponseWriter, r *http.Request) { // 302 Found 重定向到新的URL http.Redirect(w, r, "/destination", http.StatusFound) }) http.HandleFunc("/destination", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "This is the destination page.") }) fmt.Println("Server is running on :8080") http.ListenAndServe(":8080", nil) } ~~~