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

Bug in Example? #32

Open
bitnom opened this issue Mar 9, 2017 · 2 comments
Open

Bug in Example? #32

bitnom opened this issue Mar 9, 2017 · 2 comments

Comments

@bitnom
Copy link

bitnom commented Mar 9, 2017

For...

func doUpdate(url string) error {
	resp, err := http.Get(url)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	err := update.Apply(resp.Body, update.Options{})
	if err != nil {
		// error handling
	}
	return err
}

I get: no new variables on left side of :=

@bitnom
Copy link
Author

bitnom commented Mar 9, 2017

Had to change the second usage of err to err2

@ivahaev
Copy link

ivahaev commented Mar 20, 2017

No need to change variable name. Just use "=" instead of ":="

blmoore added a commit to blmoore/go-update that referenced this issue Nov 5, 2018
Bluebugs referenced this issue in fynelabs/selfupdate May 30, 2022
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

No branches or pull requests

2 participants