Skip to content

centralize harded-code message #3349

@fahedouch

Description

@fahedouch

Hello containerd people,

By browsing the client's code, i saw a harded coded message like
errors.New("no grpc connection or services is available")

My idea is to centralize hard coded messages in a logic like enum.

The advantage of doing that:

  • To increase the code readability and the maintainability
  • Constants consistently, expressively and type-safe
  • Sharing common behavior
  • Easy to make internationalization if we want to support other language in the futur

If your ok. We should think how to avoid the negative pressure on this enum if it will be called by many objects as a client.

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