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

link: add LoadPinnedLink #491

Merged
merged 1 commit into from
Nov 18, 2021
Merged

link: add LoadPinnedLink #491

merged 1 commit into from
Nov 18, 2021

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Nov 17, 2021

Add a function that allows loading any pinned link. This allows us to
deprecate all of the separate LoadPinned* functions. In the future we
can use LoadPinnedLink to build APIs that work with any kind of link.

@mehrdadrad
Copy link
Contributor

return nil, fmt.Errorf("get pinned link info: %s", err)

 return nil, fmt.Errorf("get pinned link info: %w", err) 

link/link_test.go Outdated Show resolved Hide resolved
return LoadPinnedRawLink(f, UnspecifiedType, opts)
},
})
testLink(t, link, prog)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
testLink(t, link, prog)
testLink(t, &linkCgroup{*link}, prog)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

Add a function that allows loading any pinned link. This allows us to
deprecate all of the separate LoadPinned* functions. In the future we
can use LoadPinnedLink to build APIs that work with any kind of link.
@lmb lmb merged commit e3c50b8 into master Nov 18, 2021
@lmb lmb deleted the lmb/load-pinned-link branch November 18, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants