ddl2struct

command module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

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

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL