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

Cannot import internal common package. #1377

Closed
davidnewhall opened this issue Nov 12, 2022 · 1 comment · Fixed by #1379
Closed

Cannot import internal common package. #1377

davidnewhall opened this issue Nov 12, 2022 · 1 comment · Fixed by #1379

Comments

@davidnewhall
Copy link
Contributor

davidnewhall commented Nov 12, 2022

Now that host.Warnings has been moved into an internal package, how are we supposed to unwrap it?

I used to do this, but my code quit working when I updated this library to the latest release today. ie. go get ./... in my project.

	var warns *host.Warnings
	if !errors.As(err, &warns) {
		return fmt.Errorf("unable to get sensor temperatures: %w", err)
	}

	for i, w := range warns.List {
		fmt.Sprint("warning %v: %v", i+1, w)
	}

Re: #1347

@shirou
Copy link
Owner

shirou commented Nov 13, 2022

oh, unwrap... Yes, you are true. Then, I will make a PR about moving back Warnings to disk and host from common. Thank you so much!

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 a pull request may close this issue.

2 participants