exportstruct

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

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 6 Imported by: 0

README

GitHub go.mod Go version GoDoc

ExportStruct

Connect to postgres and download golang structs with some optional tags

Get started

Install: go get github.com/Fliko/exportstruct

Run: exportstruct help

If exportstruct is not found make sure that your GOPATH/bin is in your PATH.

Documentation

Overview

Package exportStruct - A new cli application

USAGE:

main [global options] command [command options] [arguments...]

DESCRIPTION:

Connects to your db and converts tables into structs

COMMANDS:

help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:

--file FILE, --of FILE            Generated code exports to FILE (default: "types.go")
--user USER, -u USER              Database USER (default: "postgres") [$ES_USER]
--password PASSWORD, -p PASSWORD  Database PASSWORD (default: "password") [$ES_PASS]
--host HOST, -a HOST              Address of db HOST (default: "::1") [$ES_HOST]
--port PORT                       PORT of db (default: "5432") [$ES_PORT]
--db NAME                         NAME of db (default: "postgres") [$ES_DB]
--package value, --pkg value      Package name for generated go file (default: "main")
--ssl-mode disable, --sm disable  Set ssl-mode to verify-full or disable (default: disable) (default: false)
--json                            Add json tags, camelcase (default: false)
--sql                             Add sql tags, snake_case (default: false)
--help, -h                        show help (default: false)

Jump to

Keyboard shortcuts

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