Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Running Go + AWS example

未关闭
#647 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
停滞
技术栈
aws, go
领域
backend, cloud

调研方向

从 aws-golang-http-get-post 示例及其当前基于 dep 的设置开始,然后查看报告的 PR 和提议的基于 go.mod 的结构。确认该示例可与现代 Go 模块配合工作,并且其文件夹布局遵循典型的 Go 模块约定。

由索引模型根据 Issue 内容生成。

描述

I tried to run the following example (https://github.com/serverless/examples/tree/master/aws-golang-http-get-post), but hit a few roadblocks on the way and could not get it to work:

1. "dep" command not found

to solve this, i followed the instructions here: https://forum.serverless.com/t/trying-to-get-serverless-golang-example-to-work/5676, so running "go get -v -u github.com/golang/dep/cmd/dep".
However, dep does not install anymore, with the following error:

# github.com/golang/dep/gps
../../../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:103:21: cannot use sv (type *semver.Version) as type semver.Version in field value
../../../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:122:16: invalid type assertion: c.(semver.Version) (non-interface type *semver.Constraints on left)
../../../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:149:4: undefined: semver.Constraint

2. "dep" is deprecated and it is not possible to install it anymore

Looking into it, it seems that the dep package is abandoned and replaced by go modules instead: https://github.com/golang/dep

So my follow up question would be: Do you have any go + aws examples using modern go with modules or would it be easily possible to convert the current examples (I assume using a go.mod file instead would probably work).

Update: I submitted a PR that will make it compile again, but I think the examples need a deeper structural change to confirm to typical go modules folder structures.

主要语言
JavaScript
星标
11.5k
派生
4.4k
平均合并
2 小时 12 分钟
30 天内合并 PR
4

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

serverless/examples 的其他 Issue

查看 serverless/examples 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。