Skip to content

Commit

Permalink
sync: update CI config files (#87)
Browse files Browse the repository at this point in the history
This commit was moved from ipfs/interface-go-ipfs-core@de3410b
  • Loading branch information
web3-bot authored Aug 25, 2022
1 parent af97165 commit a94ac86
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 42 deletions.
3 changes: 2 additions & 1 deletion coreiface/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package iface

import (
"context"
path "github.com/ipfs/interface-go-ipfs-core/path"
"io"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"
)

Expand Down
1 change: 1 addition & 0 deletions coreiface/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package iface

import (
"context"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"
Expand Down
1 change: 1 addition & 0 deletions coreiface/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package iface

import (
"context"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"
Expand Down
1 change: 1 addition & 0 deletions coreiface/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package iface
import (
"context"
"errors"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"
Expand Down
3 changes: 2 additions & 1 deletion coreiface/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package iface

import (
"context"
path "github.com/ipfs/interface-go-ipfs-core/path"
"io"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"

"github.com/ipfs/go-cid"
Expand Down
2 changes: 1 addition & 1 deletion coreiface/options/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (keyOpts) Type(algorithm string) KeyGenerateOption {
// generated. Default is -1
//
// value of -1 means 'use default size for key type':
// * 2048 for RSA
// - 2048 for RSA
func (keyOpts) Size(size int) KeyGenerateOption {
return func(settings *KeyGenerateSettings) error {
settings.Size = size
Expand Down
1 change: 0 additions & 1 deletion coreiface/options/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func (nameOpts) Cache(cache bool) NameResolveOption {
}
}

//
func (nameOpts) ResolveOption(opt ropts.ResolveOpt) NameResolveOption {
return func(settings *NameResolveSettings) error {
settings.ResolveOpts = append(settings.ResolveOpts, opt)
Expand Down
40 changes: 20 additions & 20 deletions coreiface/options/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ func (pinLsOpts) Indirect() PinLsOption {
// type.
//
// Supported values:
// * "direct" - directly pinned objects
// * "recursive" - roots of recursive pins
// * "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// * "all" - all pinned objects (default)
// - "direct" - directly pinned objects
// - "recursive" - roots of recursive pins
// - "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// - "all" - all pinned objects (default)
func (pinLsOpts) Type(typeStr string) (PinLsOption, error) {
switch typeStr {
case "all", "direct", "indirect", "recursive":
Expand All @@ -182,11 +182,11 @@ func (pinLsOpts) Type(typeStr string) (PinLsOption, error) {
// be returned
//
// Supported values:
// * "direct" - directly pinned objects
// * "recursive" - roots of recursive pins
// * "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// * "all" - all pinned objects (default)
// - "direct" - directly pinned objects
// - "recursive" - roots of recursive pins
// - "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// - "all" - all pinned objects (default)
func (pinLsOpts) pinType(t string) PinLsOption {
return func(settings *PinLsSettings) error {
settings.Type = t
Expand Down Expand Up @@ -224,11 +224,11 @@ func (pinIsPinnedOpts) Indirect() PinIsPinnedOption {
// type.
//
// Supported values:
// * "direct" - directly pinned objects
// * "recursive" - roots of recursive pins
// * "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// * "all" - all pinned objects (default)
// - "direct" - directly pinned objects
// - "recursive" - roots of recursive pins
// - "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// - "all" - all pinned objects (default)
func (pinIsPinnedOpts) Type(typeStr string) (PinIsPinnedOption, error) {
switch typeStr {
case "all", "direct", "indirect", "recursive":
Expand All @@ -242,11 +242,11 @@ func (pinIsPinnedOpts) Type(typeStr string) (PinIsPinnedOption, error) {
// pin is expected to be, speeding up the research.
//
// Supported values:
// * "direct" - directly pinned objects
// * "recursive" - roots of recursive pins
// * "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// * "all" - all pinned objects (default)
// - "direct" - directly pinned objects
// - "recursive" - roots of recursive pins
// - "indirect" - indirectly pinned objects (referenced by recursively pinned
// objects)
// - "all" - all pinned objects (default)
func (pinIsPinnedOpts) pinType(t string) PinIsPinnedOption {
return func(settings *PinIsPinnedSettings) error {
settings.WithType = t
Expand Down
2 changes: 1 addition & 1 deletion coreiface/path/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// * /ipfs - Immutable unixfs path (files)
// * /ipld - Immutable ipld path (data)
// * /ipns - Mutable names. Usually resolves to one of the immutable paths
//TODO: /local (MFS)
// TODO: /local (MFS)
type Path interface {
// String returns the path as a string.
String() string
Expand Down
1 change: 1 addition & 0 deletions coreiface/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package iface

import (
"context"

path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/interface-go-ipfs-core/options"
Expand Down
5 changes: 2 additions & 3 deletions coreiface/tests/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"io"
"io/ioutil"
"strings"
"testing"

Expand Down Expand Up @@ -211,7 +210,7 @@ func (tp *TestSuite) TestBlockGet(t *testing.T) {
t.Fatal(err)
}

d, err := ioutil.ReadAll(r)
d, err := io.ReadAll(r)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -249,7 +248,7 @@ func (tp *TestSuite) TestBlockRm(t *testing.T) {
t.Fatal(err)
}

d, err := ioutil.ReadAll(r)
d, err := io.ReadAll(r)
if err != nil {
t.Fatal(err)
}
Expand Down
3 changes: 2 additions & 1 deletion coreiface/tests/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package tests

import (
"context"
path "github.com/ipfs/interface-go-ipfs-core/path"
"math"
gopath "path"
"strings"
"testing"

path "github.com/ipfs/interface-go-ipfs-core/path"

coreiface "github.com/ipfs/interface-go-ipfs-core"

ipldcbor "github.com/ipfs/go-ipld-cbor"
Expand Down
10 changes: 5 additions & 5 deletions coreiface/tests/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"bytes"
"context"
"encoding/hex"
"io/ioutil"
"io"
"strings"
"testing"

"github.com/ipfs/interface-go-ipfs-core"
iface "github.com/ipfs/interface-go-ipfs-core"
opt "github.com/ipfs/interface-go-ipfs-core/options"
)

Expand Down Expand Up @@ -143,7 +143,7 @@ func (tp *TestSuite) TestObjectData(t *testing.T) {
t.Fatal(err)
}

data, err := ioutil.ReadAll(r)
data, err := io.ReadAll(r)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -383,7 +383,7 @@ func (tp *TestSuite) TestObjectAddData(t *testing.T) {
t.Fatal(err)
}

data, err := ioutil.ReadAll(r)
data, err := io.ReadAll(r)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -416,7 +416,7 @@ func (tp *TestSuite) TestObjectSetData(t *testing.T) {
t.Fatal(err)
}

data, err := ioutil.ReadAll(r)
data, err := io.ReadAll(r)
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion coreiface/tests/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/ipfs/interface-go-ipfs-core"
iface "github.com/ipfs/interface-go-ipfs-core"
opt "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"

Expand Down
2 changes: 1 addition & 1 deletion coreiface/tests/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/ipfs/interface-go-ipfs-core"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
)

Expand Down
9 changes: 4 additions & 5 deletions coreiface/tests/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"math"
"math/rand"
"os"
Expand Down Expand Up @@ -113,7 +112,7 @@ func (tp *TestSuite) TestAdd(t *testing.T) {
return path.IpfsPath(c)
}

rf, err := ioutil.TempFile(os.TempDir(), "unixfs-add-real")
rf, err := os.CreateTemp(os.TempDir(), "unixfs-add-real")
if err != nil {
t.Fatal(err)
}
Expand All @@ -134,7 +133,7 @@ func (tp *TestSuite) TestAdd(t *testing.T) {
defer os.Remove(rfp)

realFile := func() files.Node {
n, err := files.NewReaderPathFile(rfp, ioutil.NopCloser(strings.NewReader(helloStr)), stat)
n, err := files.NewReaderPathFile(rfp, io.NopCloser(strings.NewReader(helloStr)), stat)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -474,12 +473,12 @@ func (tp *TestSuite) TestAdd(t *testing.T) {
defer orig.Close()
defer got.Close()

do, err := ioutil.ReadAll(orig.(files.File))
do, err := io.ReadAll(orig.(files.File))
if err != nil {
t.Fatal(err)
}

dg, err := ioutil.ReadAll(got.(files.File))
dg, err := io.ReadAll(got.(files.File))
if err != nil {
t.Fatal(err)
}
Expand Down
3 changes: 2 additions & 1 deletion coreiface/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package iface

import (
"context"

"github.com/ipfs/interface-go-ipfs-core/options"
path "github.com/ipfs/interface-go-ipfs-core/path"

"github.com/ipfs/go-cid"
"github.com/ipfs/go-ipfs-files"
files "github.com/ipfs/go-ipfs-files"
)

type AddEvent struct {
Expand Down

0 comments on commit a94ac86

Please sign in to comment.