Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwelin committed Feb 10, 2020
1 parent 4e497af commit 69056e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type TmplData struct {
ApiEndpoints string
LambdaFunctionName string
ApiProjectName string
Language string
}

type LanguageMapper struct {
Expand All @@ -27,7 +28,6 @@ type LanguageMapper struct {
DepsPath string
}

// Usage to-do
var languages = map[string]LanguageMapper{
"node": LanguageMapper{
AppFile: "index.js",
Expand Down Expand Up @@ -137,6 +137,7 @@ func main() {
ApiEndpoints: "regional",
LambdaFunctionName: "helloworld",
ApiProjectName: "Hello-World-API",
Language: "node",
}

err := apiTmpl.createFileFromTemplate(apiGWConf, "", "apigw.yml")
Expand All @@ -149,7 +150,7 @@ func main() {
panic(err)
}

err = createFileFromStruct(languages["node"])
err = createFileFromStruct(languages[apiTmpl.Language])
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 69056e7

Please sign in to comment.