+1
.gitignore
+1
.gitignore
+17
.golangci.yaml
+17
.golangci.yaml
···
1
+
version: "2"
2
+
3
+
issues:
4
+
max-issues-per-linter: 0
5
+
max-same-issues: 0
6
+
7
+
linters:
8
+
disable:
9
+
- errcheck
10
+
- gocritic
11
+
- unused
12
+
settings:
13
+
errcheck:
14
+
check-type-assertions: true
15
+
disable-default-exclusions: true
16
+
gocritic:
17
+
enable-all: true
-5
atproto/identity/apidir/apidir.go
-5
atproto/identity/apidir/apidir.go
+1
-1
atproto/identity/directory.go
+1
-1
atproto/identity/directory.go
···
57
57
var ErrKeyNotDeclared = errors.New("DID document did not declare a relevant public key")
58
58
59
59
// Handle was invalid, in a situation where a valid handle is required.
60
-
var ErrInvalidHandle = errors.New("Invalid Handle")
60
+
var ErrInvalidHandle = errors.New("invalid handle")
61
61
62
62
var DefaultPLCURL = "https://plc.directory"
63
63
+3
atproto/lexicon/cmd/lextool/net.go
+3
atproto/lexicon/cmd/lextool/net.go
+1
-2
atproto/repo/mst/mst_interop_test.go
+1
-2
atproto/repo/mst/mst_interop_test.go
···
104
104
}
105
105
106
106
func TestInteropKnownMapsTricky(t *testing.T) {
107
+
t.Skip("TODO: these are currently disallowed in typescript implementation")
107
108
assert := assert.New(t)
108
-
109
-
t.Skip("TODO: these are currently disallowed in typescript implementation")
110
109
111
110
cid1str := "bafyreie5cvv4h45feadgeuwhbcutmh6t2ceseocckahdoe6uat64zmz454"
112
111
+1
-1
atproto/repo/mst/mst_test.go
+1
-1
atproto/repo/mst/mst_test.go
+1
-1
atproto/repo/mst/node.go
+1
-1
atproto/repo/mst/node.go
+4
-1
atproto/repo/mst/node_insert.go
+4
-1
atproto/repo/mst/node_insert.go
···
1
1
package mst
2
2
3
3
import (
4
+
"errors"
4
5
"fmt"
5
6
"slices"
6
7
···
66
67
}
67
68
68
69
// include "covering" proof for this operation
69
-
proveMutation(n, key)
70
+
if err := proveMutation(n, key); err != nil && !errors.Is(err, ErrPartialTree) {
71
+
return nil, nil, err
72
+
}
70
73
71
74
if !split {
72
75
// TODO: is this really necessary? or can we just slices.Insert beyond the end of a slice?
+4
-1
atproto/repo/mst/node_remove.go
+4
-1
atproto/repo/mst/node_remove.go
···
1
1
package mst
2
2
3
3
import (
4
+
"errors"
4
5
"fmt"
5
6
"slices"
6
7
···
61
62
}
62
63
63
64
// marks adjacent child nodes dirty to include as "proof"
64
-
proveMutation(n, key)
65
+
if err := proveMutation(n, key); err != nil && !errors.Is(err, ErrPartialTree) {
66
+
return nil, nil, err
67
+
}
65
68
66
69
// check if top of node is now just a pointer
67
70
if top {
+1
-1
atproto/repo/operation.go
+1
-1
atproto/repo/operation.go
+3
-2
atproto/repo/operation_test.go
+3
-2
atproto/repo/operation_test.go
···
91
91
assert.NoError(err)
92
92
assert.Error(CheckOp(tree, op))
93
93
94
-
op, err = ApplyOp(tree, "color/pink", &c3)
94
+
_, err = ApplyOp(tree, "color/pink", &c3)
95
95
assert.NoError(err)
96
96
op, err = ApplyOp(tree, "color/pink", &c2)
97
+
assert.NoError(err)
97
98
assert.NoError(CheckOp(tree, op))
98
99
assert.True(op.IsUpdate())
99
100
err = InvertOp(tree, op)
···
130
131
}
131
132
mapKeys := make([]string, len(startMap))
132
133
i := 0
133
-
for k, _ := range startMap {
134
+
for k := range startMap {
134
135
mapKeys[i] = k
135
136
i++
136
137
}
-1
atproto/syntax/did.go
-1
atproto/syntax/did.go
+1
-1
atproto/syntax/tid.go
+1
-1
atproto/syntax/tid.go
···
58
58
59
59
// Constructs a new TID from a UNIX timestamp (in milliseconds) and clock ID value.
60
60
func NewTID(unixMicros int64, clockId uint) TID {
61
-
var v uint64 = (uint64(unixMicros&0x1F_FFFF_FFFF_FFFF) << 10) | uint64(clockId&0x3FF)
61
+
v := (uint64(unixMicros&0x1F_FFFF_FFFF_FFFF) << 10) | uint64(clockId&0x3FF)
62
62
return NewTIDFromInteger(v)
63
63
}
64
64