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

chore: simplify directory structure #19

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/blob/blob.go → blob/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
math "math"
"sort"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
"google.golang.org/protobuf/proto"
)

Expand Down
124 changes: 62 additions & 62 deletions pkg/blob/blob.pb.go → blob/blob.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/blob/blob.proto → blob/blob.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package pkg.blob;

option go_package = "github.com/celestiaorg/go-square/pkg/blob";
option go_package = "github.com/celestiaorg/go-square/blob";

// Blob (named after binary large object) is a chunk of data submitted by a user
// to be published to the Celestia blockchain. The data of a Blob is published
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package inclusion
import (
"math"

"github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/shares"
"golang.org/x/exp/constraints"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"testing"

"github.com/celestiaorg/go-square/pkg/inclusion"
"github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/inclusion"
"github.com/celestiaorg/go-square/shares"
"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/inclusion/commitment.go → inclusion/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package inclusion
import (
"crypto/sha256"

"github.com/celestiaorg/go-square/pkg/blob"
ns "github.com/celestiaorg/go-square/pkg/namespace"
sh "github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/blob"
ns "github.com/celestiaorg/go-square/namespace"
sh "github.com/celestiaorg/go-square/shares"
"github.com/celestiaorg/nmt"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"crypto/sha256"
"testing"

"github.com/celestiaorg/go-square/pkg/blob"
"github.com/celestiaorg/go-square/pkg/inclusion"
"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/blob"
"github.com/celestiaorg/go-square/inclusion"
"github.com/celestiaorg/go-square/namespace"
"github.com/celestiaorg/go-square/shares"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
6 changes: 3 additions & 3 deletions internal/test/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"math/rand"

"github.com/celestiaorg/go-square/pkg/blob"
"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/blob"
"github.com/celestiaorg/go-square/namespace"
"github.com/celestiaorg/go-square/shares"
)

var DefaultTestNamespace = namespace.MustNewV0([]byte("test"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/shares/consts.go → shares/consts.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shares

import (
"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
)

const (
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/shares/counter_test.go → shares/counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"testing"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/pkg/shares"
"github.com/celestiaorg/go-square/namespace"
"github.com/celestiaorg/go-square/shares"
"github.com/stretchr/testify/require"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/shares/namespace.go → shares/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package shares
import (
"fmt"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
)

// GetShareRangeForNamespace returns all shares that belong to a given
Expand Down
2 changes: 1 addition & 1 deletion pkg/shares/padding.go → shares/padding.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"errors"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
)

// NamespacePaddingShare returns a share that acts as padding. Namespace padding
Expand Down
2 changes: 1 addition & 1 deletion pkg/shares/padding_test.go → shares/padding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

"github.com/celestiaorg/go-square/pkg/namespace"
"github.com/celestiaorg/go-square/namespace"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/shares/parse.go → shares/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"fmt"

"github.com/celestiaorg/go-square/pkg/blob"
"github.com/celestiaorg/go-square/blob"
)

// ParseTxs collects all of the transactions from the shares provided
Expand Down
File renamed without changes.
Loading
Loading