This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const childProcess = require("child_process"); | |
const spawn = (command, args) => { | |
return new Promise((resolve, reject) => { | |
const p = Array.isArray(args) | |
? childProcess.spawn(command, args, { stdio: "inherit" }) | |
: childProcess.spawn(command, { stdio: "inherit" }); | |
p.on("close", code => resolve(code)); | |
p.on("error", err => reject(err)); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "encoding/json" | |
func structToMap(s interface{}) map[string]interface{} { | |
m := make(map[string]interface{}) | |
b, _ := json.Marshal(s) | |
json.Unmarshal(b, &m) | |
return m | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"apigateway:*", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:ContinueUpdateRollback", | |
"cloudformation:CreateChangeSet", | |
"cloudformation:CreateStack", | |
"cloudformation:CreateUploadBucket", |
OlderNewer