我正在努力创建一个用于管理数字海洋飞沫的小控制台,这是我第一次体验Go ..
我有这个错误
s, _ := json.Marshal(r);
// convert type
req, _ := http.NewRequest("GET", "https://api.digitalocean.com/v2/droplets", s)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
req.Header.Set("Content-Type", "application/json")
response, _ := client.Do(req)
Run Code Online (Sandbox Code Playgroud)
如何为func NewRequest转换为良好类型值的s []字节?!NewRequest期望Body类型为io.Reader ..
s, _ := json.Marshal(r);
// convert type
req, _ := http.NewRequest("GET", "https://api.digitalocean.com/v2/droplets", s)
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
req.Header.Set("Content-Type", "application/json")
response, _ := client.Do(req)
Run Code Online (Sandbox Code Playgroud)
谢谢!
我正在使用 Jekyll 开发一个新版本的静态网站,该网站通过 Github 页面部署:https : //devcampy.com
存储库:https : //github.com/gianarb/devcampy.com
我在本地使用 docker 运行它,但无法重现该问题:
$ docker run --rm -p 4000:4000 -v "$PWD":/srv/jekyll jekyll/jekyll:stable jekyll serve
Run Code Online (Sandbox Code Playgroud)
这是我推送到存储库时通过电子邮件收到的错误。我不明白为什么它不能正常工作
The page build failed for the `master` branch with the following error:
Your SCSS file `assets/main.scss` has an error on line 6: File to import not found or unreadable: vendor/rfs. Load paths: node_modules /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass. For more information, see https://help.github.com/en/articles/page-build-failed-invalid-sass-or-scss.
Run Code Online (Sandbox Code Playgroud)
有人有任何反馈吗?非常感谢