Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gostnops
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
gostnops
Commits
660039bc
Commit
660039bc
authored
Nov 28, 2019
by
zhanghuiren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make bigInt unexport
parent
dffe91c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
integer.go
math/big/integer.go
+7
-7
No files found.
math/big/integer.go
View file @
660039bc
...
...
@@ -24,7 +24,7 @@ import (
// Integer represents a integer value.
type
Integer
struct
{
big
.
Int
big
Int
big
.
Int
// for hessian
Value
string
...
...
@@ -36,31 +36,31 @@ func (Integer) JavaClassName() string {
// FromString set data from a 10-bases number
func
(
i
*
Integer
)
FromString
(
s
string
)
error
{
intPtr
,
ok
:=
i
.
Int
.
SetString
(
s
,
10
)
intPtr
,
ok
:=
i
.
big
Int
.
SetString
(
s
,
10
)
if
!
ok
||
intPtr
==
nil
{
return
fmt
.
Errorf
(
"'%s' is not a 10-based number"
,
s
)
}
i
.
Int
=
*
intPtr
i
.
big
Int
=
*
intPtr
return
nil
}
// FromBytes set data from a 10-bases number bytes
func
(
i
*
Integer
)
FromBytes
(
bytes
[]
byte
)
error
{
i
.
Int
=
*
i
.
Int
.
SetBytes
(
bytes
)
i
.
bigInt
=
*
i
.
big
Int
.
SetBytes
(
bytes
)
return
nil
}
// GetBigInt getter
func
(
i
*
Integer
)
GetBigInt
()
big
.
Int
{
return
i
.
Int
return
i
.
big
Int
}
// SetBigInt setter
func
(
i
*
Integer
)
SetBigInt
(
bigInt
big
.
Int
)
{
i
.
Int
=
bigInt
i
.
big
Int
=
bigInt
}
func
(
i
*
Integer
)
String
()
string
{
return
i
.
Int
.
String
()
return
i
.
big
Int
.
String
()
}
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