ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ 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) } ~~~