Compare commits

...

12 Commits

Author SHA1 Message Date
cf0ccd2f6e refactor(benchmark_test): migrate from github.com/ipfs/go-cid to code.sonr.org/go/cid
Some checks failed
Close Stale Issues / stale (push) Has been cancelled
Close Generated PRs / stale (push) Has been cancelled
Go Checks / go-check (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Releaser / releaser (push) Has been cancelled
Tag Push Checker / releaser (push) Has been cancelled
2026-01-08 15:46:16 -05:00
a7a1f319b3 docs(readme): update readme to reflect new package path 2026-01-08 15:46:14 -05:00
8c8b22eab1 docs(core): update deprecated comment with new pull request link 2026-01-08 15:46:13 -05:00
af732567fd chore(config): add Repo.toml and update go.mod for config changes 2026-01-08 15:46:12 -05:00
dependabot[bot]
1b3fc58457 chore(deps): bump golang.org/x/crypto from 0.35.0 to 0.45.0 (#179)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.35.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.35.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 14:57:43 +13:00
Rod Vagg
594b41a340 v0.6.0 bump (#178) 2025-10-28 12:15:36 +11:00
dependabot[bot]
7942a87de8 chore(deps): bump github.com/multiformats/go-varint from 0.0.7 to 0.1.0 (#177)
Bumps [github.com/multiformats/go-varint](https://github.com/multiformats/go-varint) from 0.0.7 to 0.1.0.
- [Release notes](https://github.com/multiformats/go-varint/releases)
- [Commits](https://github.com/multiformats/go-varint/compare/v0.0.7...v0.1.0)

---
updated-dependencies:
- dependency-name: github.com/multiformats/go-varint
  dependency-version: 0.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 12:12:14 +11:00
Andrew Gillis
6365bffd65 Merge pull request #176 from ipfs/uci/update-go
ci: uci/update-go
2025-08-20 22:10:32 -07:00
web3-bot
1022508918 chore!: bump go.mod to Go 1.24 and run go fix
BREAKING CHANGE: Updating the Go version to 1.24
2025-08-20 16:22:55 +00:00
dependabot[bot]
1afa3fef92 chore(deps): bump golang.org/x/crypto from 0.31.0 to 0.35.0 (#175)
* chore(deps): bump golang.org/x/crypto from 0.31.0 to 0.35.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.35.0.
- [Commits](https://github.com/golang/crypto/compare/v0.31.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.35.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update go.mod

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
2025-04-15 10:32:11 +10:00
web3-bot
3b830eb57c ci: uci/copy-templates (#174)
* chore: add or force update .github/workflows/stale.yml

* chore: add or force update .github/workflows/generated-pr.yml
2025-03-28 19:15:37 +01:00
web3-bot
4d43496971 chore!: bump go.mod to Go 1.23 and run go fix (#173)
BREAKING CHANGE: Updating the Go version to 1.23
2025-02-16 22:33:16 +01:00
10 changed files with 42 additions and 20 deletions

7
.github/Repo.toml vendored Normal file
View File

@@ -0,0 +1,7 @@
[scopes]
ci = [".github/workflows"]
config = [".github", "codecov.yml", "go.mod", "go.sum", "Makefile", "version.json"]
docs = ["README.md", "LICENSE"]
tests = ["*_test.go", "fuzz-data"]
research = ["_rsrch"]
core = ["cid.go", "builder.go", "set.go", "varint.go", "cid_fuzz.go", "deprecated.go"]

14
.github/workflows/generated-pr.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Close Generated PRs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
stale:
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-generated-pr.yml@v1

View File

@@ -1,8 +1,9 @@
name: Close and mark stale issue name: Close Stale Issues
on: on:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
workflow_dispatch:
permissions: permissions:
issues: write issues: write
@@ -10,4 +11,4 @@ permissions:
jobs: jobs:
stale: stale:
uses: pl-strflt/.github/.github/workflows/reusable-stale-issue.yml@v0.3 uses: ipdxco/unified-github-workflows/.github/workflows/reusable-stale-issue.yml@v1

View File

@@ -5,7 +5,7 @@ go-cid
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) [![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) [![](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![GoDoc](https://godoc.org/github.com/ipfs/go-cid?status.svg)](https://godoc.org/github.com/ipfs/go-cid) [![GoDoc](https://godoc.org/code.sonr.org/go/cid?status.svg)](https://godoc.org/code.sonr.org/go/cid)
[![Coverage Status](https://coveralls.io/repos/github/ipfs/go-cid/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-cid?branch=master) [![Coverage Status](https://coveralls.io/repos/github/ipfs/go-cid/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-cid?branch=master)
[![Travis CI](https://travis-ci.org/ipfs/go-cid.svg?branch=master)](https://travis-ci.org/ipfs/go-cid) [![Travis CI](https://travis-ci.org/ipfs/go-cid.svg?branch=master)](https://travis-ci.org/ipfs/go-cid)
@@ -31,7 +31,7 @@ It is used in `go-ipfs` and related packages to refer to a typed hunk of data.
`go-cid` is a standard Go module which can be installed with: `go-cid` is a standard Go module which can be installed with:
```sh ```sh
go get github.com/ipfs/go-cid go get code.sonr.org/go/cid
``` ```
## Usage ## Usage
@@ -61,7 +61,7 @@ fmt.Println("Got CID: ", c)
```go ```go
import ( import (
cid "github.com/ipfs/go-cid" cid "code.sonr.org/go/cid"
mc "github.com/multiformats/go-multicodec" mc "github.com/multiformats/go-multicodec"
mh "github.com/multiformats/go-multihash" mh "github.com/multiformats/go-multihash"
) )

View File

@@ -4,7 +4,7 @@ import (
"math/rand" "math/rand"
"testing" "testing"
"github.com/ipfs/go-cid" "code.sonr.org/go/cid"
"github.com/multiformats/go-multihash" "github.com/multiformats/go-multihash"
) )

2
cid.go
View File

@@ -70,7 +70,7 @@ var (
) )
// Consts below are DEPRECATED and left only for legacy reasons: // Consts below are DEPRECATED and left only for legacy reasons:
// <https://github.com/ipfs/go-cid/pull/137> // <https://code.sonr.org/go/cid/pull/137>
// Modern code should use consts from go-multicodec instead: // Modern code should use consts from go-multicodec instead:
// <https://github.com/multiformats/go-multicodec> // <https://github.com/multiformats/go-multicodec>
const ( const (

View File

@@ -33,7 +33,7 @@ func assertEqual(t *testing.T, a, b Cid) {
func TestPrefixSum(t *testing.T) { func TestPrefixSum(t *testing.T) {
// Test creating CIDs both manually and with Prefix. // Test creating CIDs both manually and with Prefix.
// Tests: https://github.com/ipfs/go-cid/issues/83 // Tests: https://code.sonr.org/go/cid/issues/83
for _, hashfun := range []uint64{ for _, hashfun := range []uint64{
mh.IDENTITY, mh.SHA3, mh.SHA2_256, mh.IDENTITY, mh.SHA3, mh.SHA2_256,
} { } {

10
go.mod
View File

@@ -1,9 +1,9 @@
module github.com/ipfs/go-cid module code.sonr.org/go/cid
require ( require (
github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multibase v0.2.0
github.com/multiformats/go-multihash v0.2.3 github.com/multiformats/go-multihash v0.2.3
github.com/multiformats/go-varint v0.0.7 github.com/multiformats/go-varint v0.1.0
) )
require ( require (
@@ -13,9 +13,9 @@ require (
github.com/multiformats/go-base32 v0.0.3 // indirect github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect
golang.org/x/crypto v0.31.0 // indirect golang.org/x/crypto v0.45.0 // indirect
golang.org/x/sys v0.28.0 // indirect golang.org/x/sys v0.38.0 // indirect
lukechampine.com/blake3 v1.1.6 // indirect lukechampine.com/blake3 v1.1.6 // indirect
) )
go 1.22 go 1.24.0

12
go.sum
View File

@@ -13,13 +13,13 @@ github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivnc
github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk=
github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM=
github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.1.0 h1:i2wqFp4sdl3IcIxfAonHQV9qU5OsZ4Ts9IOoETFs5dI=
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/multiformats/go-varint v0.1.0/go.mod h1:5KVAVXegtfmNQQm/lCY+ATvDzvJJhSkUlGQV9wgObdI=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c= lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c=
lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=

View File

@@ -1,3 +1,3 @@
{ {
"version": "v0.5.0" "version": "v0.6.0"
} }