Skip to content

Commit

Permalink
create dir & gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwelin committed Feb 10, 2020
1 parent d97dd35 commit 15de344
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src
apigw.yml
swagger-api.yml
main
14 changes: 14 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ type TmplData struct {
var allowedAPIProtocols = []string{"rest", "websocket"}
var allowedRestAPIEndpoints = []string{"regional", "edge", "private"}

func createDir(path string) error {
err := os.MkdirAll(path, os.ModePerm)
if err != nil {
return err
}
return nil
}

func main() {

apiTmpl := TmplData{
ApiProtocol: "rest",
ApiEndpoints: "regional",
Expand All @@ -32,4 +41,9 @@ func main() {
if err != nil {
panic(err)
}

err = createDir("src/helloworld/app")
if err != nil {
panic(err)
}
}

0 comments on commit 15de344

Please sign in to comment.