Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

cannot use file (type *io.Reader) as type io.Reader in argument to io.Copy #95

Closed
markns opened this issue Mar 2, 2018 · 1 comment
Closed
Labels

Comments

@markns
Copy link

markns commented Mar 2, 2018

Hey @JonasFranzDEV, I get the following compilation error using the latest commit:

# bitbucket.org/gridarrow/gridarrow-manager/vendor/code.gitea.io/sdk/gitea
vendor/code.gitea.io/sdk/gitea/attachment.go:11:2: imported and not used: "io/ioutil"
vendor/code.gitea.io/sdk/gitea/attachment.go:58:21: cannot use file (type *io.Reader) as type io.Reader in argument to io.Copy:
	*io.Reader is pointer to interface, not interface

This is with the following glide dependency:

- package: code.gitea.io/sdk
  subpackages:
  - gitea

Previous commit works fine for me. Not a go expert, so perhaps it's my bad somehow...

@jonasfranz
Copy link
Member

I will fix it today

jonasfranz added a commit to jonasfranz/go-sdk that referenced this issue Mar 2, 2018
jonasfranz added a commit to jonasfranz/go-sdk that referenced this issue Mar 2, 2018
…ader

Signed-off-by: Jonas Franz <[email protected]>

(cherry picked from commit f46f7c8)
Signed-off-by: Jonas Franz <[email protected]>
@lunny lunny added the kind/bug label Mar 2, 2018
appleboy pushed a commit that referenced this issue Mar 2, 2018
* Fix #95 by removing unused imports and using a non-pointer reader

Signed-off-by: Jonas Franz <[email protected]>

(cherry picked from commit f46f7c8)
Signed-off-by: Jonas Franz <[email protected]>

* Replace *io.Reader with io.Reader

Signed-off-by: Jonas Franz <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants