+
Skip to content

Reading a slice from env vars with unique indexes in the var name #355

Closed
@renom

Description

@renom

For example:

FILES_0_NAME=A
FILES_1_NAME=B
FILES_2_NAME=C
FILES_3_NAME=D

The above vars should populate the following:

type Config struct {
    Files []File
}

type File struct {
    Name string
}

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载