Skip to content

Commit

Permalink
fix golang package name
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen917 committed Oct 4, 2023
1 parent 37902b3 commit 3c43000
Show file tree
Hide file tree
Showing 7 changed files with 924 additions and 924 deletions.
208 changes: 104 additions & 104 deletions abis/BlockHashPublisher/BlockHashPublisher.go

Large diffs are not rendered by default.

256 changes: 128 additions & 128 deletions abis/BlockHashReceiver/BlockHashReceiver.go

Large diffs are not rendered by default.

484 changes: 242 additions & 242 deletions abis/ERC20Bridge/ERC20Bridge.go

Large diffs are not rendered by default.

260 changes: 130 additions & 130 deletions abis/ExampleCrossChainMessenger/ExampleCrossChainMessenger.go

Large diffs are not rendered by default.

632 changes: 316 additions & 316 deletions abis/TeleporterMessenger/TeleporterMessenger.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/abi_go_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ do
echo "Generating Go bindings for $contract_name..."
mkdir -p $TELEPORTER_PATH/abis/$contract_name
$GOPATH/bin/abigen --abi $abi_file \
--pkg $(convertToSnakeCase $contract_name) \
--pkg $(convertToLower $contract_name) \
--out $TELEPORTER_PATH/abis/$contract_name/$contract_name.go
echo "Done generating Go bindings for $contract_name."
done
Expand Down
6 changes: 3 additions & 3 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function setARCH() {
echo "ARCH set to $ARCH"
}

function convertToSnakeCase() {
function convertToLower() {
if [ "$ARCH" = 'arm64' ]; then
echo $1 | perl -pe 's/([A-Z])/_\L\1/g' | sed 's/^_//'
echo $1 | perl -ne 'print lc'
else
echo $1 | sed -r 's/([A-Z])/_\L\1/g' | sed 's/^_//'
echo $1 | sed -e 's/\(.*\)/\L\1/'
fi
}

0 comments on commit 3c43000

Please sign in to comment.