Categorygithub.com/realsangil/ddl2struct
repositorypackage
0.0.7
Repository: https://github.com/realsangil/ddl2struct.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Welcome to ddl2struct šŸ‘‹

Version License

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

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