diff --git a/data-strings.go b/data-strings.go index a45ee02..820ad3c 100644 --- a/data-strings.go +++ b/data-strings.go @@ -11,85 +11,6 @@ scaffold go NewGoProject scaffold py aPythonProject ` -// var gi_template = `%s -// .env -// *.env -// .env.toml - -// cfg/*.toml -// cfg/.env -// cfg/*.env -// cfg/.env* -// *.toml - -// build/ -// buildTime.txt -// buildVersion.txt -// ` - -// var gi_py_template = `%s -// .env -// *.env -// .env.toml - -// cfg/*.toml -// cfg/.env -// cfg/*.env -// cfg/.env* -// *.toml - -// bin/ -// ` - -// var cfg_content = `# New Go Project configuration file - -// # Format: TOML - see https://toml.io for details - -// # Go specific -// # Go module path is of the form basePath/projectName -// # must be addressable if you are going to publish -// module_basepath = "officallygood.com" - -// # where to put new project directories -// # within the user's home directory -// projects_basedir = "devel/GoMyApps" -// #def_project_name = "new-go-project" - -// # Must be string, will be parsed to correct type -// # Remember perms are in octal -// project_dir_permissions = "0700" -// file_permissions = "0660" - -// # Git -// setup_git = true - -// # Do you have a remote location? -// # Do you have autologins setup correctly with ssh keys? -// # Using your .ssh/config file might be helpful - -// # setup remote repo? -// create_remote_repo = false - -// # remote repo user@location -// remote_user = "user@server" - -// # remote repo base dir -// # relative to remote user home dir -// # eg unix/linux server -// # for user@server:/home/user/git -- absolute path -// user@server:git -- relative to home dir -// # eg windows server -// # ??? - -// ############################ -// # remote location MUST already exist on remote server -// ############################ -// remote_location = "git" - -// # default remote short name -// remote_shortname = "origin" -//` - var cfg_content = `# Scaffold program configuration # Format: TOML - see https://toml.io for details diff --git a/main.go b/main.go index a8e4f1f..4efca19 100644 --- a/main.go +++ b/main.go @@ -84,6 +84,7 @@ func main() { _, err = cfgfd.WriteString(cfg_content) ifFerr("Unable to write scaffold configuration file content", err) fmt.Println("Wrote new scaffold configuration file") + _, err = toml.Decode(cfg_content, &setup) ifFerr("[Failed] to parse config file", err) } else {