From 57e20cbfe3955bb05ed2fc54b8f661ddd16f3bef Mon Sep 17 00:00:00 2001 From: Patrick O'brien Date: Tue, 1 Mar 2016 21:11:55 +1000 Subject: [PATCH] Added imports objects --- cmds/commands.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cmds/commands.go b/cmds/commands.go index ad7bf52..82493ec 100644 --- a/cmds/commands.go +++ b/cmds/commands.go @@ -6,6 +6,27 @@ import ( "github.com/spf13/cobra" ) +// imports defines the optional standard imports and +// thirdparty imports (from github for example) +type imports struct { + standard []string + thirdparty []string +} + +// sqlBoilerDefaultImports defines the list of default template imports. +// Imports that are defined +var sqlBoilerDefaultImports = imports{ + standard: []string{ + "errors", + "fmt", + }, + thirdparty: []string{ + "github.com/jmoiron/sqlx", + }, +} + +var sqlBoilerCustomImports map[string]imports + // sqlBoilerCommands points each command to its cobra.Command variable. // // If you would like to add your own custom command, add it to this