repositorypackage
0.0.7
Repository: https://github.com/realsangil/ddl2struct.git
Documentation: pkg.go.dev
# README
Welcome to ddl2struct š
Create golang struct from ddl
Install
go get github.com/realsangil/ddl2struct
Usage
ddl2struct [flags]
Flags
-c, --copy copy to clipboard
-h, --help help for ddl2struct
-i, --input string sql file path
-o, --output string output file path
Example
ddl2struct -i example.sql
Result
# ____ ____ __ ____ __ ____ ____ ____ _ _ ___ ____
# ( ( ( ) (_ _/ \ / ___(_ _( _ / )( \/ __(_ _)
# ) D () D / (_/\ )(( O ) \___ \ )( ) ) \/ ( (__ )(
# (____(____\____/ (__)\__/ (____/(__)(__\_\____/\___)(__)
===============================================================
TableName: ddl2struct
ColumnCount: 5
Save your times: About 10 seconds
===============================================================
type ddl2struct struct {
Personid int `json:"personid" gorm:"Column:personid"`
Lastname string `json:"lastname" gorm:"Column:lastname"`
Firstname string `json:"firstname" gorm:"Column:firstname"`
Address string `json:"address" gorm:"Column:address"`
City string `json:"city" gorm:"Column:city"`
}
Author
š¤ realsangil
- Website: blog.realsangil.net
- Github: @realsangil
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2020 realsangil.
This project is Apache License 2.0 licensed.
This README was generated with ā¤ļø by readme-md-generator