Skip to content

Commit

Permalink
add license header
Browse files Browse the repository at this point in the history
  • Loading branch information
studyzy committed Apr 25, 2024
1 parent af77c67 commit bea3419
Show file tree
Hide file tree
Showing 24 changed files with 400 additions and 22 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ALL_SRC := $(shell find . -name '*.go' -type f | sort)
install-tools:
@which golangci-lint > /dev/null || (echo 'install golangci-lint' && go install github.com/golangci/golangci-lint/cmd/[email protected])
go install github.com/google/addlicense@latest

add-license:
addlicense -c 'The BxELab studyzy Authors' $(ALL_SRC)

check-license:
@ADD_LICENSE_OUT=`addlicense -check $(ALL_SRC) 2>&1`; \
if [ "$$ADD_LICENSE_OUT" ]; then \
echo "addlicense FAILED => add License errors:\n"; \
echo "$$ADD_LICENSE_OUT\n"; \
echo "Use 'make add-license' to fix this."; \
exit 1; \
else \
echo "Check License finished successfully"; \
fi
ut:
go test -v ./...


lint:
golangci-lint run ./...
16 changes: 15 additions & 1 deletion artifact.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

type Artifact struct {
Cenotaph *Cenotaph
Expand Down
16 changes: 15 additions & 1 deletion cenotaph.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

type Cenotaph struct {
Etching *Rune
Expand Down
16 changes: 15 additions & 1 deletion common.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"errors"
Expand Down
16 changes: 15 additions & 1 deletion common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"math/big"
Expand Down
46 changes: 46 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package runestone is an open-source implementation of the Bitcoin Rune protocol in Go.
//
// The runestone project aims to provide a robust, efficient, and easy-to-use library for developers
// to interact with the Rune protocol. It covers various aspects of the protocol, such as transaction
// handling, block validation, and network communication.
//
// Features:
// - Rune protocol implementation: This package contains a complete implementation of the Rune protocol,
// allowing developers to build and interact with Bitcoin Rune applications easily.
// - Modular design: The package is designed with modularity in mind, making it easy to extend and customize
// for specific use cases.
// - Efficient and performant: The Go language offers excellent performance and efficient memory usage,
// making this package suitable for use in high-performance applications.
// - Well-documented and tested: The package includes comprehensive documentation and test coverage,
// ensuring its reliability and ease of use.
//
// Getting started:
// To start using the runestone package, simply import it into your Go project:
//
// ```
// go get github.com/bxelab/runestone
// ```
//
// You can then use the various components provided by the package to interact with the Rune protocol,
// such as creating transactions, validating blocks, and communicating with other nodes on the network.
//
// For more information and examples, please refer to the package documentation and the project's
// GitHub repository.
//
// Contributions and feedback are welcome! If you encounter any issues or have suggestions for improvements,
// please open an issue on the project's GitHub repository or submit a pull request.
package runestone
16 changes: 15 additions & 1 deletion edict.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"errors"
Expand Down
16 changes: 15 additions & 1 deletion etching.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"lukechampine.com/uint128"
Expand Down
16 changes: 15 additions & 1 deletion etching_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"strings"
Expand Down
16 changes: 15 additions & 1 deletion flag.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import "lukechampine.com/uint128"

Expand Down
16 changes: 15 additions & 1 deletion flag_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"testing"
Expand Down
16 changes: 15 additions & 1 deletion flaw.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import "errors"

Expand Down
16 changes: 15 additions & 1 deletion message.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"github.com/btcsuite/btcd/wire"
Expand Down
16 changes: 15 additions & 1 deletion message_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"encoding/hex"
Expand Down
16 changes: 15 additions & 1 deletion rune.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"errors"
Expand Down
16 changes: 15 additions & 1 deletion rune_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"math"
Expand Down
16 changes: 15 additions & 1 deletion runeid.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"errors"
Expand Down
16 changes: 15 additions & 1 deletion runeid_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
package go_runestone
// Copyright 2024 The BxELab studyzy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runestone

import (
"fmt"
Expand Down
Loading

0 comments on commit bea3419

Please sign in to comment.