Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace parsedotenv.env map with []string #103

Open
komuw opened this issue Apr 27, 2018 · 0 comments
Open

replace parsedotenv.env map with []string #103

komuw opened this issue Apr 27, 2018 · 0 comments

Comments

@komuw
Copy link
Owner

komuw commented Apr 27, 2018

A requisite for this is that we port over the test suite from[3]

replace parsedotenv.env replace env with a []string since ComposeService.Environment is a []string[1]

This will help us not incur this loop[2]

ref:

  1. meli/parsedotenv.go

    Lines 25 to 26 in 7fab55b

    // env holds key/value pair of valid environment variable
    // TODO: replace env with a []string since ComposeService.Environment is a []string

  2. meli/container.go

    Lines 186 to 195 in 7fab55b

    // TODO: replace env in parseDotEnv.go with a []string since ComposeService.Environment is a []string
    // that way we wont have to incur this for loop
    containerEnv := []string{}
    for k, v := range envMap {
    envMap[k] = v
    x := fmt.Sprintf("%s=%s", k, v)
    containerEnv = append(containerEnv, x)
    }
    containerEnv = append(containerEnv, dc.ComposeService.Environment...)
    fmt.Printf("\n\n containerEnv 2:%v \n", containerEnv)

  3. https://github.com/subosito/gotenv/blob/master/gotenv_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant