Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
cbor-gen
Commits
ad5b8262
Unverified
Commit
ad5b8262
authored
Apr 22, 2021
by
Steven Allen
Committed by
GitHub
Apr 22, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #53 from daotl/upstream
fix: import "math" in generated code for uint8 unmarshalling
parents
67a261a1
87e48c96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
gen.go
gen.go
+2
-0
testing/cbor_gen.go
testing/cbor_gen.go
+2
-0
testing/cbor_map_gen.go
testing/cbor_map_gen.go
+2
-0
No files found.
gen.go
View file @
ad5b8262
...
...
@@ -57,6 +57,7 @@ package {{ .Package }}
import (
"fmt"
"io"
"math"
"sort"
{{ range .Imports }}{{ .Name }} "{{ .PkgPath }}"
...
...
@@ -66,6 +67,7 @@ import (
var _ = xerrors.Errorf
var _ = cid.Undef
var _ = math.E
var _ = sort.Sort
`
)
...
...
testing/cbor_gen.go
View file @
ad5b8262
...
...
@@ -5,6 +5,7 @@ package testing
import
(
"fmt"
"io"
"math"
"sort"
cid
"github.com/ipfs/go-cid"
...
...
@@ -14,6 +15,7 @@ import (
var
_
=
xerrors
.
Errorf
var
_
=
cid
.
Undef
var
_
=
math
.
E
var
_
=
sort
.
Sort
var
lengthBufSignedArray
=
[]
byte
{
129
}
...
...
testing/cbor_map_gen.go
View file @
ad5b8262
...
...
@@ -5,6 +5,7 @@ package testing
import
(
"fmt"
"io"
"math"
"sort"
cid
"github.com/ipfs/go-cid"
...
...
@@ -14,6 +15,7 @@ import (
var
_
=
xerrors
.
Errorf
var
_
=
cid
.
Undef
var
_
=
math
.
E
var
_
=
sort
.
Sort
func
(
t
*
SimpleTypeTree
)
MarshalCBOR
(
w
io
.
Writer
)
error
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment