Skip to content

replace parsedotenv.env map with []string #103

@komuw

Description

@komuw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions