column2struct

command module
v0.0.0-...-ad6a127 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

column2struct

Generate gorm.io stucts from MySQL(or MariaDB)'s information_schema.columns.

Install

go get github.com/eyasuyuki/column2struct

Usage

go run github.com/eyasuyuki/column2struct <DSN> [<filename>]

DSN : data set name

filename : output file name

Example

go run github.com/eyasuyuki/column2struct 'user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=UTC'  ./database/database.go 

Environment variable

environment variable default description
PACKAGE_NAME "database" generated code's package name

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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