Compare commits

..

1 Commits

Author SHA1 Message Date
892a220300 Bump thatisuday/go-cross-build from 1.0.2 to 1.1.0
Bumps [thatisuday/go-cross-build](https://github.com/thatisuday/go-cross-build) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/thatisuday/go-cross-build/releases)
- [Commits](https://github.com/thatisuday/go-cross-build/compare/v1.0.2...v1.1.0)

---
updated-dependencies:
- dependency-name: thatisuday/go-cross-build
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 09:58:14 +00:00
3 changed files with 12 additions and 13 deletions

View File

@ -13,7 +13,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Generate build files - name: Generate build files
uses: thatisuday/go-cross-build@v1.0.2 uses: thatisuday/go-cross-build@v1.1.0
with: with:
platforms: 'linux/amd64, linux/ppc64le, darwin/amd64, darwin/arm64, windows/amd64' platforms: 'linux/amd64, linux/ppc64le, darwin/amd64, darwin/arm64, windows/amd64'
package: 'cmd/godotenv' package: 'cmd/godotenv'

View File

@ -47,10 +47,9 @@ Then in your Go app you can do something like
package main package main
import ( import (
"github.com/joho/godotenv"
"log" "log"
"os" "os"
"github.com/joho/godotenv"
) )
func main() { func main() {

View File

@ -30,15 +30,15 @@ const doubleQuoteSpecialChars = "\\\n\r\"!$`"
// Load will read your env file(s) and load them into ENV for this process. // Load will read your env file(s) and load them into ENV for this process.
// //
// Call this function as close as possible to the start of your program (ideally in main). // Call this function as close as possible to the start of your program (ideally in main)
// //
// If you call Load without any args it will default to loading .env in the current path. // If you call Load without any args it will default to loading .env in the current path
// //
// You can otherwise tell it which files to load (there can be more than one) like: // You can otherwise tell it which files to load (there can be more than one) like
// //
// godotenv.Load("fileone", "filetwo") // godotenv.Load("fileone", "filetwo")
// //
// It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults. // It's important to note that it WILL NOT OVERRIDE an env variable that already exists - consider the .env file to set dev vars or sensible defaults
func Load(filenames ...string) (err error) { func Load(filenames ...string) (err error) {
filenames = filenamesOrDefault(filenames) filenames = filenamesOrDefault(filenames)
@ -53,11 +53,11 @@ func Load(filenames ...string) (err error) {
// Overload will read your env file(s) and load them into ENV for this process. // Overload will read your env file(s) and load them into ENV for this process.
// //
// Call this function as close as possible to the start of your program (ideally in main). // Call this function as close as possible to the start of your program (ideally in main)
// //
// If you call Overload without any args it will default to loading .env in the current path. // If you call Overload without any args it will default to loading .env in the current path
// //
// You can otherwise tell it which files to load (there can be more than one) like: // You can otherwise tell it which files to load (there can be more than one) like
// //
// godotenv.Overload("fileone", "filetwo") // godotenv.Overload("fileone", "filetwo")
// //
@ -132,7 +132,7 @@ func Unmarshal(str string) (envMap map[string]string, err error) {
// Exec loads env vars from the specified filenames (empty map falls back to default) // Exec loads env vars from the specified filenames (empty map falls back to default)
// then executes the cmd specified. // then executes the cmd specified.
// //
// Simply hooks up os.Stdin/err/out to the command and calls Run(). // Simply hooks up os.Stdin/err/out to the command and calls Run()
// //
// If you want more fine grained control over your command it's recommended // If you want more fine grained control over your command it's recommended
// that you use `Load()` or `Read()` and the `os/exec` package yourself. // that you use `Load()` or `Read()` and the `os/exec` package yourself.
@ -146,7 +146,7 @@ func Exec(filenames []string, cmd string, cmdArgs []string) error {
return command.Run() return command.Run()
} }
// Write serializes the given environment and writes it to a file. // Write serializes the given environment and writes it to a file
func Write(envMap map[string]string, filename string) error { func Write(envMap map[string]string, filename string) error {
content, err := Marshal(envMap) content, err := Marshal(envMap)
if err != nil { if err != nil {