Skip to content

Improve usability of Project & Service objects #305

Closed as not planned
Closed as not planned
@milas

Description

@milas

Description

The Project and Service objects returned by this library often
confuse users because certain fields are not always initialized.

For example, CustomLabels (a map[string]string) will be nil
on each Service.

Potential Solutions

  • Add NewProject and NewService constructors that initialize
    all fields consistently
  • Add helper methods, e.g. AddCustomLabel that internally handle
    initialization lazily

Related Issues

docker/compose#9808

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions