https://github.com/icemap/yaml2go-cli
A command line tool to parse yaml file to golang struct code file
https://github.com/icemap/yaml2go-cli
cli golang golang-library yaml
Last synced: 5 months ago
JSON representation
A command line tool to parse yaml file to golang struct code file
- Host: GitHub
- URL: https://github.com/icemap/yaml2go-cli
- Owner: Icemap
- Created: 2022-02-26T08:15:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-26T16:04:01.000Z (over 4 years ago)
- Last Synced: 2025-02-12T16:52:11.584Z (over 1 year ago)
- Topics: cli, golang, golang-library, yaml
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yaml2go-cli

a command tool for [yaml2go](https://github.com/PrasadG193/yaml2go)
let it can use `go install` command
## Install
```bash
go install github.com/Icemap/yaml2go-cli@latest
```
## Show Help
```bash
./yaml2go-cli -h
yaml2go-cli is a cli-tool for yaml to go struct
Usage:
yaml2go-cli [flags]
Flags:
-h, --help help for yaml2go-cli
-i, --input string input yaml file path
-o, --output string output go file path
-p, --package string package name (default "main")
-s, --struct string struct name (default "Default")
```
## Example
```
./yaml2go-cli -i test/test.yaml -o test/test.bean.file
```
- [test/test.yaml](test/test.yaml)
- [test/test.bean.file](test/test.bean.file)