utils

package
v0.0.0-...-8c09973 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileName = "sqlcodegen.yml"

Functions

func Comment

func Comment(str string) string

func FindConfigPath

func FindConfigPath() (string, error)

func Format

func Format(filename string, buf bytes.Buffer) []byte

Types

type Config

type Config struct {
	Out struct {
		Package string
		File    string
	}
	Tags    []string
	Typemap map[string]string
	Imports []string
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type SqlResultColumn

type SqlResultColumn struct {
	Name string
	Type string
}

func AnalyzeSQL

func AnalyzeSQL(sql string, url string) ([]SqlResultColumn, error)

type StringLiteral

type StringLiteral struct {
	Value   string
	Comment string
}

func ExtractCommentedStringLiterals

func ExtractCommentedStringLiterals(filePath string, re *regexp.Regexp) ([]StringLiteral, error)

Jump to

Keyboard shortcuts

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