Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 days 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 (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-26T16:04:01.000Z (almost 3 years ago)
- Last Synced: 2024-12-19T20:51:39.051Z (about 2 months 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
![build_badge](https://github.com/Icemap/yaml2go-cli/workflows/Go/badge.svg)
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 structUsage:
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)