Skip to content

Commit

Permalink
Compilation fix for uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Furano committed Feb 15, 2021
1 parent 955ad02 commit bff0e4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.1
github.com/myesui/uuid v1.0.0
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/ory/fosite v0.37.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwd
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
github.com/moul/http2curl v0.0.0-20170919181001-9ac6cf4d929b/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/myesui/uuid v1.0.0 h1:xCBmH4l5KuvLYc5L7AS7SZg9/jKdIFubM7OVoLqaQUI=
github.com/myesui/uuid v1.0.0/go.mod h1:2CDfNgU0LR8mIdO8vdWd8i9gWWxLlcoIGGpSNgafq84=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
Expand Down
6 changes: 3 additions & 3 deletions pkg/eosclient/eosgrpc/eosgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ func (c *Client) UpdateACL(ctx context.Context, uid, gid, rootUID, rootGID, path
}

// GetACL for a file
func (c *Client) UpdateACL(ctx context.Context, uid, gid, path, aclType, target string) (*acl.Entry, error) {
func (c *Client) GetACL(ctx context.Context, uid, gid, path, aclType, target string) (*acl.Entry, error) {

log := appctx.GetLogger(ctx)
log.Info().Str("func", "GetACL").Str("uid,gid", uid+","+gid).Str("path", path).Msg("")
log.Info().Str("func", "UpdateACL").Str("uid,gid", uid+","+gid).Str("path", path).Msg("")

acls, err := c.ListACLs(ctx, uid, gid, path)
if err != nil {
Expand Down Expand Up @@ -970,7 +970,7 @@ func (c *Client) Read(ctx context.Context, uid, gid, path string) (io.ReadCloser
log := appctx.GetLogger(ctx)
log.Info().Str("func", "Read").Str("uid,gid", uid+","+gid).Str("path", path).Msg("")

rand := "eosread-" + uuid.Must(uuid.NewV4()).String()
rand := "eosread-" + uuid.New().String()
localTarget := fmt.Sprintf("%s/%s", c.opt.CacheDirectory, rand)
defer os.RemoveAll(localTarget)

Expand Down

0 comments on commit bff0e4c

Please sign in to comment.