Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocibundle: confusing naming for tools.<type>.Path code #2304

Open
dtrudg opened this issue Nov 2, 2023 · 0 comments
Open

ocibundle: confusing naming for tools.<type>.Path code #2304

dtrudg opened this issue Nov 2, 2023 · 0 comments
Labels

Comments

@dtrudg
Copy link
Member

dtrudg commented Nov 2, 2023

Type of issue

technical debt

Description of issue

In ocibundle.tools there is a pattern like:

type Rootfs string

func (r Rootfs) Path()

Where the value of the Rootfs string itself is the bundle path, and Rootfs.Path() gives the rootfs path inside that bundle.

This is very confusing from the point of view of type naming etc.

At point of use it is slightly better... Rootfs("mybundle").Path() being possible to read as give me Path of the Rootfs of "mybundle".

We should consider deprecating and replacing with nicer named functions on a single bundle type / struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant