Skip to content

Instantly share code, notes, and snippets.

@LeonanCarvalho
Last active July 9, 2024 12:33
Show Gist options
  • Save LeonanCarvalho/24f88f2a62533d00c1003bda5ed4b941 to your computer and use it in GitHub Desktop.
Save LeonanCarvalho/24f88f2a62533d00c1003bda5ed4b941 to your computer and use it in GitHub Desktop.
SPB-xsd-to-struct
# Convert SPB xsd to type structs.
# 1. Require Go 1.20+
# echo "golang 1.22.4" > .tool-versions
# source ~/.zshrc
install:
go install github.com/xuri/xgen/cmd/xgen@latest && \
wget https://www.bcb.gov.br/content/estabilidadefinanceira/cedsfn/Catalogos/XSDDOCV508.zip && \
unzip XSDDOCV508.zip -d spb && \
rm -rf XSDDOCV508.zip
generate-go:
xgen -i spb/STR -o spb-go/str -p str -l Go
generate-ts:
xgen -i spb/STR -o spb-ts/str -p str -l TypeScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment