Skip to content

Commit

Permalink
feat: adds public ToMap function (#275)
Browse files Browse the repository at this point in the history
Co-authored-by: Maksim Panfilov <maksim.panfilov@diabolocom.com>
  • Loading branch information
maxfilov and Maksim Panfilov committed Aug 3, 2023
1 parent e7e49c4 commit 92df8c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions env.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,3 +581,9 @@ func parseTextUnmarshalers(field reflect.Value, data []string, sf reflect.Struct

return nil
}

// ToMap Converts list of env vars as provided by os.Environ() to map you
// can use as Options.Environment field
func ToMap(env []string) map[string]string {
return toMap(env)
}

0 comments on commit 92df8c4

Please sign in to comment.