Skip to content

Adding comments to hosts records #56

@Alvov1

Description

@Alvov1

I'd like to get an option to write a hosts record with comment. In my organization we're adding a lot of hosts records through our cli tool, and we want to specify that this record relates to our stuff

func (h *Hosts) AddCommented(ip string, comment string, hosts ...string) error { ... }

hosts, err := hostsfile.NewHosts()
hosts.AddCommented("5.226.232.29", "added-by-ORG", "environment-10-proxy")

5.226.232.29 environment-10-proxy # added-by-ORG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions