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

document and add example using unmarshaler interface #41

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

jessepeterson
Copy link
Member

Resolves #14.

@jessepeterson
Copy link
Member Author

Ideas welcome for a simpler example.

Comment on lines 58 to 59
// Example_unmarshaler demonstrates using structs that use the Unmarshaler interface.
func Example_unmarshaler() {
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is renamed ExampleUnmarshaler, it will be come an example on the interface instead of a package-level example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh. That was my goal! I tried to find examples and docs of how to do that, but came up empty. Was that documented somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

This blog post is what I was going off of: https://go.dev/blog/examples

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's what I read. I guess I didn't extend the function naming from the non-whole file example to the whole-file in my head. 🤷 Thanks!

Copy link
Contributor

@korylprince korylprince left a comment

Choose a reason for hiding this comment

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

LGTM, though you might consider changing the example function name.

@jessepeterson jessepeterson merged commit 0993743 into micromdm:main Nov 27, 2024
6 checks passed
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.

How do I implement UnmarshalPlist?
2 participants