Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
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
张蕾
Geth-Modification
Commits
9bfd0b60
Unverified
Commit
9bfd0b60
authored
6 years ago
by
Guillaume Ballet
Committed by
GitHub
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/abi: fix case of generated java functions (#18372)
parent
a4af7343
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
bind.go
accounts/abi/bind/bind.go
+6
-4
No files found.
accounts/abi/bind/bind.go
View file @
9bfd0b60
...
...
@@ -381,7 +381,7 @@ func namedTypeJava(javaKind string, solKind abi.Type) string {
// methodNormalizer is a name transformer that modifies Solidity method names to
// conform to target language naming concentions.
var
methodNormalizer
=
map
[
Lang
]
func
(
string
)
string
{
LangGo
:
capitali
se
,
LangGo
:
abi
.
ToCamelCa
se
,
LangJava
:
decapitalise
,
}
...
...
@@ -392,10 +392,12 @@ func capitalise(input string) string {
// decapitalise makes a camel-case string which starts with a lower case character.
func
decapitalise
(
input
string
)
string
{
// NOTE: This is the current behavior, it doesn't match the comment
// above and needs to be investigated.
return
abi
.
ToCamelCase
(
input
)
if
len
(
input
)
==
0
{
return
input
}
goForm
:=
abi
.
ToCamelCase
(
input
)
return
strings
.
ToLower
(
goForm
[
:
1
])
+
goForm
[
1
:
]
}
// structured checks whether a list of ABI data types has enough information to
...
...
This diff is collapsed.
Click to expand it.
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