github批量删除仓库

    as:=`linyo/jo`
    fd:=strings.Split(as,"\n")
    for _, s := range fd {
        url := fmt.Sprintf("https://api.github.com/repos/%s",s)
        req, _ := http.NewRequest("DELETE", url, nil)
        req.Header.Add("Authorization", "token ghp_EX23HukExEBbcUnP5D9WsaNI5a3TLpXL")
        res, _ := http.DefaultClient.Do(req)
        res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
        fmt.Println(res)
        fmt.Println(string(body),1111111)
    }

你可能感兴趣的:(github批量删除仓库)