第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

: URL 中的第一個(gè)路徑段不能包含冒號(hào)

: URL 中的第一個(gè)路徑段不能包含冒號(hào)

Go
翻閱古今 2023-06-01 18:21:36
這是我的代碼(其中的一部分):type SitemapIndex struct {    // Locations []Location `xml:"sitemap"`    Locations []string `xml:"sitemap>loc"`}~~~ SNIP ~~~func main(){    var s SitemapIndex    resp, _ := http.Get("https://www.washingtonpost.com/news-sitemaps/index.xml")    bytes, _ := ioutil.ReadAll(resp.Body)    xml.Unmarshal(bytes, &s)    for _, Location := range s.Locations {        fmt.Printf("%s\n", Location)        resp, err := http.Get(Location)        if err != nil {            log.Fatal(err)        } else {            bytes, _ := ioutil.ReadAll(resp.Body)            xml.Unmarshal(bytes, &n)            for idx := range n.Titles {                newsMap[n.Titles[idx]] = NewsMap{n.Keywords[idx], n.Locations[idx]}            }        }        for idx, data := range newsMap {            fmt.Println("\n\n\n", idx)            fmt.Println("\n", data.Keyword)            fmt.Println("\n", data.Location)        }    }現(xiàn)在,當(dāng)我運(yùn)行這段代碼時(shí),我得到了這個(gè)輸出:https://www.washingtonpost.com/news-sitemaps/politics.xml2019/01/28 02:37:13 parse https://www.washingtonpost.com/news-sitemaps/politics.xml: first path segment in URL cannot contain colonexit status 1我讀了一些帖子并自己做了一些實(shí)驗(yàn),比如我用下面的代碼制作了另一個(gè)文件package mainimport ("fmt"    "net/url")func main(){    fmt.Println(url.Parse("https://www.washingtonpost.com/news-sitemaps/politics.xml"))}而且它沒(méi)有拋出任何錯(cuò)誤,所以我知道錯(cuò)誤與 url 無(wú)關(guān)?,F(xiàn)在,我?guī)讉€(gè)小時(shí)前才開(kāi)始使用 senddex 的教程學(xué)習(xí)Go,所以現(xiàn)在還不太了解。這是視頻鏈接
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 284 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)