Skip to content

Commit

Permalink
error handling for config parse
Browse files Browse the repository at this point in the history
  • Loading branch information
r3kzi committed Jun 9, 2020
1 parent ae9048b commit 4587332
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ import (
)

func main() {
config, _ := cfg.ParseConfig("config.yml")
config, err := cfg.ParseConfig("config.yml")
if err != nil {
fmt.Println(err)
os.Exit(1)
}

// NewCredentials returns a pointer to a new Credentials object wrapping the AssumeRoleProvider
creds := stscreds.NewCredentials(session.Must(session.NewSession()), config.AWS.RoleARN)

//Creating user
// Creating user
users := user.Must(user.Read("./files/users.yml"))
if err := user.Create(users, config, creds); err != nil {
fmt.Println(err)
Expand Down

0 comments on commit 4587332

Please sign in to comment.