viant / afs

Abstract File Storage
Apache License 2.0
297 stars 34 forks source link

Build error: ../../vendor/github.com/viant/afs/embed/manager.go:5:2: cannot find package "embed" in any of #9

Closed mdelvecchio-wasabi closed 3 years ago

mdelvecchio-wasabi commented 3 years ago

I am getting this build error:

../../vendor/github.com/viant/afs/embed/manager.go:5:2: cannot find package "embed" in any of:
        /home/Murph/go/src/github.com/bluearchive/main/vendor/embed (vendor tree)
        /usr/local/go/src/embed (from $GOROOT)
        /home/Murph/go/src/embed (from $GOPATH)

I am not trying to use the embed package, but it appears that what I am trying to use requires it. Here are my imports:

        "github.com/viant/afs"
        "github.com/viant/afs/scp"
        "github.com/viant/afs/option"

And here is all the code I have written to sfar:

auth := scp.NewAuthProvider (nil, option.NewBasicAuth ("user", "password"))
service := afs.New()

I ran dep ensure, which put the packages into my vendor/github.com/viant/afs directory. It also put the embed package there.

The start of afs/embed/manager.go looks like this:

package embed

import (
        "context"
        "embed"

This package appears to be trying to import itself, which I have never seen.

My Go version is 1.12.17.

Any ideas why this isn't working?

Thanks.

mdelvecchio-wasabi commented 3 years ago

Looked at it with fresh eyes this morning.

The AFS embed package is importing the new Go embed package, which was introduced in Go version 1.16.

We are still stuck on Go version 1.12.

Never mind!