rantav / go-archetype

Project archetyping and templating in Golang
https://go-archetype.dev/
MIT License
48 stars 17 forks source link

feat: Update go and packages #11

Closed titusjaka closed 2 years ago

titusjaka commented 2 years ago

What I've done:

P.S.: You can check github actions status here: https://github.com/youla-dev/go-archetype/actions/runs/1968372445 🤓

https://github.com/rantav/go-archetype/issues/10

titusjaka commented 2 years ago

Hi @rantav 👋 Did you have a chance to see my request? 🤓

rantav commented 2 years ago

Hi sorry for the delay, I tested it locally and it looks mostly good, but if I run make test-template there's an error. It seems to be something small, a file isn't found and probably a path thing (maybe some defaults were changed in go, not sure what may cause that but anyway it seems simple to fix). Can you give it a try and fix? Here's what I see, apologies for the verbosity...

➜  go-archetype git:(go-1.17) make test-template
rm -rf .tmp/go/my-go-project
mkdir -p .tmp/go/my-go-project
LOG_LEVEL=debug go run main.go transform --transformations=transformations.yml \
        --source=. \
        --destination=.tmp/go/my-go-project \
        -- \
        --ProjectName my-go-project \
        --IncludeReadme no \
        --ProjectDescription "bla bla"
  DBG (*transformer.Transformations)(0xc00018cb00)({
 ignore: ([]types.FilePattern) (len=7 cap=8) {
  (types.FilePattern) {
   Pattern: (string) (len=5) ".git/",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=19) "transformations.yml",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=9) ".DS_Store",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=6) ".idea/",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=5) ".tmp/",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=5) "dist/",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  },
  (types.FilePattern) {
   Pattern: (string) (len=12) "go-archetype",
   glob: (glob.Glob) <nil>,
   compiled: (bool) false
  }
 },
 transformers: ([]transformer.Transformer) (len=5 cap=8) {
  (*transformer.includeTransformer)(0xc000100690)({
   name: (string) (len=23) "include the readme file",
   condition: (string) (len=13) "IncludeReadme",
   regionMarker: (string) "",
   files: ([]types.FilePattern) (len=1 cap=1) {
    (types.FilePattern) {
     Pattern: (string) (len=9) "README.md",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    }
   },
   truthy: (bool) false
  }),
  (*transformer.includeTransformer)(0xc0001006e0)({
   name: (string) (len=38) "include a reference to the readme file",
   condition: (string) (len=13) "IncludeReadme",
   regionMarker: (string) (len=18) "__INCLUDE_README__",
   files: ([]types.FilePattern) (len=1 cap=1) {
    (types.FilePattern) {
     Pattern: (string) (len=7) "main.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    }
   },
   truthy: (bool) false
  }),
  (*transformer.textReplacer)(0xc000100730)({
   name: (string) (len=24) "project long description",
   pattern: (string) (len=76) "Use go-archetype to transform project archetypes into existing live projects",
   replacement: (string) (len=7) "bla bla",
   files: ([]types.FilePattern) (len=1 cap=1) {
    (types.FilePattern) {
     Pattern: (string) (len=11) "cmd/root.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    }
   }
  }),
  (*transformer.textReplacer)(0xc0001007d0)({
   name: (string) (len=15) "project package",
   pattern: (string) (len=30) "github.com/rantav/go-archetype",
   replacement: (string) (len=18) "github.com/xxx/yyy",
   files: ([]types.FilePattern) (len=3 cap=4) {
    (types.FilePattern) {
     Pattern: (string) (len=4) "*.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    },
    (types.FilePattern) {
     Pattern: (string) (len=6) "go.mod",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    },
    (types.FilePattern) {
     Pattern: (string) (len=7) "**/*.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    }
   }
  }),
  (*transformer.textReplacer)(0xc000100870)({
   name: (string) (len=12) "project name",
   pattern: (string) (len=12) "go-archetype",
   replacement: (string) (len=13) "my-go-project",
   files: ([]types.FilePattern) (len=2 cap=2) {
    (types.FilePattern) {
     Pattern: (string) (len=4) "*.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    },
    (types.FilePattern) {
     Pattern: (string) (len=7) "**/*.go",
     glob: (glob.Glob) <nil>,
     compiled: (bool) false
    }
   }
  })
 },
 prompters: ([]inputs.Prompter) (len=3 cap=4) {
  (*inputs.simpleTextPrompter)(0xc0001008c0)({
   PromptResponse: (inputs.PromptResponse) {
    InputSpec: (inputs.InputSpec) {
     ID: (string) (len=11) "ProjectName",
     Text: (string) (len=25) "What is the project name?",
     Type: (string) (len=4) "text"
    },
    Answer: (string) (len=13) "my-go-project",
    Answered: (bool) true
   }
  }),
  (*inputs.yesNoPrompter)(0xc000100910)({
   PromptResponse: (inputs.PromptResponse) {
    InputSpec: (inputs.InputSpec) {
     ID: (string) (len=13) "IncludeReadme",
     Text: (string) (len=42) "Would you like to include the readme file?",
     Type: (string) (len=5) "yesno"
    },
    Answer: (string) "",
    Answered: (bool) true
   }
  }),
  (*inputs.simpleTextPrompter)(0xc000100960)({
   PromptResponse: (inputs.PromptResponse) {
    InputSpec: (inputs.InputSpec) {
     ID: (string) (len=18) "ProjectDescription",
     Text: (string) (len=41) "Please provide a long project description",
     Type: (string) (len=4) "text"
    },
    Answer: (string) (len=7) "bla bla",
    Answered: (bool) true
   }
  })
 },
 userInputs: (map[string]inputs.PromptResponse) (len=3) {
  (string) (len=11) "ProjectName": (inputs.PromptResponse) {
   InputSpec: (inputs.InputSpec) {
    ID: (string) (len=11) "ProjectName",
    Text: (string) (len=25) "What is the project name?",
    Type: (string) (len=4) "text"
   },
   Answer: (string) (len=13) "my-go-project",
   Answered: (bool) true
  },
  (string) (len=13) "IncludeReadme": (inputs.PromptResponse) {
   InputSpec: (inputs.InputSpec) {
    ID: (string) (len=13) "IncludeReadme",
    Text: (string) (len=42) "Would you like to include the readme file?",
    Type: (string) (len=5) "yesno"
   },
   Answer: (string) "",
   Answered: (bool) true
  },
  (string) (len=18) "ProjectDescription": (inputs.PromptResponse) {
   InputSpec: (inputs.InputSpec) {
    ID: (string) (len=18) "ProjectDescription",
    Text: (string) (len=41) "Please provide a long project description",
    Type: (string) (len=4) "text"
   },
   Answer: (string) (len=7) "bla bla",
   Answered: (bool) true
  }
 },
 before: ([]operations.Operator) (len=1 cap=1) {
  (*operations.shellOperation)(0xc000123560)({
   sh: ([]string) (len=1 cap=1) {
    (string) (len=24) "ls .tmp/go/my-go-project"
   }
  })
 },
 after: ([]operations.Operator) (len=1 cap=1) {
  (*operations.shellOperation)(0xc000123580)({
   sh: ([]string) (len=1 cap=1) {
    (string) (len=78) "echo Done archetyping from . to .tmp/go/my-go-project of project my-go-project"
   }
  })
 }
})

  INF Running command: ls .tmp/go/my-go-project
  INF Output:
  DBG Ignoring file .git/FETCH_HEAD
  DBG Ignoring file .git/HEAD
  DBG Ignoring file .git/config
  DBG Ignoring file .git/description
  DBG Ignoring file .git/hooks/applypatch-msg.sample
  DBG Ignoring file .git/hooks/commit-msg.sample
  DBG Ignoring file .git/hooks/fsmonitor-watchman.sample
  DBG Ignoring file .git/hooks/post-update.sample
  DBG Ignoring file .git/hooks/pre-applypatch.sample
  DBG Ignoring file .git/hooks/pre-commit.sample
  DBG Ignoring file .git/hooks/pre-merge-commit.sample
  DBG Ignoring file .git/hooks/pre-push.sample
  DBG Ignoring file .git/hooks/pre-rebase.sample
  DBG Ignoring file .git/hooks/pre-receive.sample
  DBG Ignoring file .git/hooks/prepare-commit-msg.sample
  DBG Ignoring file .git/hooks/update.sample
  DBG Ignoring file .git/index
  DBG Ignoring file .git/info/exclude
  DBG Ignoring file .git/logs/HEAD
  DBG Ignoring file .git/logs/refs/heads/go-1.17
  DBG Ignoring file .git/logs/refs/heads/master
  DBG Ignoring file .git/logs/refs/remotes/origin/HEAD
  DBG Ignoring file .git/objects/04/e0bff4fa1d3d4608a59d67ef2f86bd3d156fb7
  DBG Ignoring file .git/objects/13/58be991f73a785d67fe45fcdd7d3f3c784221a
  DBG Ignoring file .git/objects/2d/223d77a7aba8a3584b04387a28942ea9d4d949
  DBG Ignoring file .git/objects/32/0cea90d20e29a63c522d4ef3f7d2d611637efd
  DBG Ignoring file .git/objects/50/7b8f8de1d48f04fcc3133b958e99ea89897d55
  DBG Ignoring file .git/objects/51/cd623da606e7ce392d6789302b31d0592cb87e
  DBG Ignoring file .git/objects/5f/2c94133f347bb33cd48036af072d142c52f49f
  DBG Ignoring file .git/objects/69/f0fdaa467141440cf2ec0fbc153c1c0288aa7a
  DBG Ignoring file .git/objects/7c/182e3a89a64de95d8bfbc98985ee8fd56ffcd9
  DBG Ignoring file .git/objects/87/5253704caa3fdfad64e6c790b16cb34411dc3d
  DBG Ignoring file .git/objects/90/381c3a95c603db18cf7c7ebab8ce72786fb2d2
  DBG Ignoring file .git/objects/99/37afc9a99e43c2c821f2bd9b3bdaace14121cf
  DBG Ignoring file .git/objects/a2/b651104499e70c3acfa71532fab1aaf016e7f4
  DBG Ignoring file .git/objects/a8/aca6eae5231ddde643dae8a41150dd0d070098
  DBG Ignoring file .git/objects/c3/1e03b6aef56c6e95ef436cc46c1418b84575a0
  DBG Ignoring file .git/objects/cd/09dfaa04c884a3f7136b5aefad75bf2e8ede85
  DBG Ignoring file .git/objects/e9/41950c8ff1723cfc744618a3227c2d0a7460d4
  DBG Ignoring file .git/objects/ea/b8597438e455a9cba0e86b07c5261eaa89e03b
  DBG Ignoring file .git/objects/pack/pack-4acda1923c3a99e279c306e506e4e1db370bbf29.idx
  DBG Ignoring file .git/objects/pack/pack-4acda1923c3a99e279c306e506e4e1db370bbf29.pack
  DBG Ignoring file .git/packed-refs
  DBG Ignoring file .git/refs/heads/go-1.17
  DBG Ignoring file .git/refs/heads/master
  DBG Ignoring file .git/refs/remotes/origin/HEAD
  INF Writing file .tmp/go/my-go-project/.githooks/pre-commit
  INF Writing file .tmp/go/my-go-project/.github/workflows/go.yml
  INF Writing file .tmp/go/my-go-project/.github/workflows/release.yml
  INF Writing file .tmp/go/my-go-project/.gitignore
  INF Writing file .tmp/go/my-go-project/.golangci.yml
  INF Writing file .tmp/go/my-go-project/.goreleaser.yml
  DBG Ignoring file .tmp/go/my-go-project/.githooks/pre-commit
  DBG Ignoring file .tmp/go/my-go-project/.github/workflows/go.yml
  DBG Ignoring file .tmp/go/my-go-project/.github/workflows/release.yml
  DBG Ignoring file .tmp/go/my-go-project/.gitignore
  DBG Ignoring file .tmp/go/my-go-project/.golangci.yml
  DBG Ignoring file .tmp/go/my-go-project/.goreleaser.yml
  INF Writing file .tmp/go/my-go-project/CNAME
  INF Writing file .tmp/go/my-go-project/LICENSE
  INF Writing file .tmp/go/my-go-project/Makefile
  DBG Applying transformer [include the readme file] to file [README.md]
  DBG File is discarded, not writing: README.md
  INF Writing file .tmp/go/my-go-project/_config.yml
  DBG Applying transformer [project package] to file [cmd/flags.go]
  DBG Applying transformer [project name] to file [cmd/flags.go]
  INF Writing file .tmp/go/my-go-project/cmd/flags.go
  DBG Applying transformer [project long description] to file [cmd/root.go]
  DBG Applying transformer [project package] to file [cmd/root.go]
  DBG Applying transformer [project name] to file [cmd/root.go]
  INF Writing file .tmp/go/my-go-project/cmd/root.go
  DBG Applying transformer [project package] to file [cmd/transform.go]
  DBG Applying transformer [project name] to file [cmd/transform.go]
  INF Writing file .tmp/go/my-go-project/cmd/transform.go
  DBG Applying transformer [project package] to file [generator/generator.go]
  DBG Applying transformer [project name] to file [generator/generator.go]
  INF Writing file .tmp/go/my-go-project/generator/generator.go
  DBG Applying transformer [project package] to file [go.mod]
  INF Writing file .tmp/go/my-go-project/go.mod
  INF Writing file .tmp/go/my-go-project/go.sum
  DBG Applying transformer [project package] to file [inputs/cli.go]
  DBG Applying transformer [project name] to file [inputs/cli.go]
  INF Writing file .tmp/go/my-go-project/inputs/cli.go
  DBG Applying transformer [project package] to file [inputs/cli_test.go]
  DBG Applying transformer [project name] to file [inputs/cli_test.go]
  INF Writing file .tmp/go/my-go-project/inputs/cli_test.go
  DBG Applying transformer [project package] to file [inputs/collector.go]
  DBG Applying transformer [project name] to file [inputs/collector.go]
  INF Writing file .tmp/go/my-go-project/inputs/collector.go
  DBG Applying transformer [project package] to file [inputs/collector_test.go]
  DBG Applying transformer [project name] to file [inputs/collector_test.go]
  INF Writing file .tmp/go/my-go-project/inputs/collector_test.go
  DBG Applying transformer [project package] to file [inputs/input-spec.go]
  DBG Applying transformer [project name] to file [inputs/input-spec.go]
  INF Writing file .tmp/go/my-go-project/inputs/input-spec.go
  DBG Applying transformer [project package] to file [inputs/input-spec_test.go]
  DBG Applying transformer [project name] to file [inputs/input-spec_test.go]
  INF Writing file .tmp/go/my-go-project/inputs/input-spec_test.go
  DBG Applying transformer [project package] to file [inputs/prompter.go]
  DBG Applying transformer [project name] to file [inputs/prompter.go]
  INF Writing file .tmp/go/my-go-project/inputs/prompter.go
  DBG Applying transformer [project package] to file [inputs/prompter_test.go]
  DBG Applying transformer [project name] to file [inputs/prompter_test.go]
  INF Writing file .tmp/go/my-go-project/inputs/prompter_test.go
  DBG Applying transformer [project package] to file [inputs/simple-text-prompter.go]
  DBG Applying transformer [project name] to file [inputs/simple-text-prompter.go]
  INF Writing file .tmp/go/my-go-project/inputs/simple-text-prompter.go
  DBG Applying transformer [project package] to file [inputs/simple-text-prompter_test.go]
  DBG Applying transformer [project name] to file [inputs/simple-text-prompter_test.go]
  INF Writing file .tmp/go/my-go-project/inputs/simple-text-prompter_test.go
  DBG Applying transformer [project package] to file [inputs/yes-no-prompter.go]
  DBG Applying transformer [project name] to file [inputs/yes-no-prompter.go]
  INF Writing file .tmp/go/my-go-project/inputs/yes-no-prompter.go
  DBG Applying transformer [project package] to file [log/log.go]
  DBG Applying transformer [project name] to file [log/log.go]
  INF Writing file .tmp/go/my-go-project/log/log.go
  DBG Applying transformer [include a reference to the readme file] to file [main.go]
  DBG Applying transformer [project package] to file [main.go]
  DBG Applying transformer [project name] to file [main.go]
  INF Writing file .tmp/go/my-go-project/main.go
  DBG Applying transformer [project package] to file [operations/operation-spec.go]
  DBG Applying transformer [project name] to file [operations/operation-spec.go]
  INF Writing file .tmp/go/my-go-project/operations/operation-spec.go
  DBG Applying transformer [project package] to file [operations/operation-spec_test.go]
  DBG Applying transformer [project name] to file [operations/operation-spec_test.go]
  INF Writing file .tmp/go/my-go-project/operations/operation-spec_test.go
  DBG Applying transformer [project package] to file [operations/operator.go]
  DBG Applying transformer [project name] to file [operations/operator.go]
  INF Writing file .tmp/go/my-go-project/operations/operator.go
  DBG Applying transformer [project package] to file [operations/operator_test.go]
  DBG Applying transformer [project name] to file [operations/operator_test.go]
  INF Writing file .tmp/go/my-go-project/operations/operator_test.go
  DBG Applying transformer [project package] to file [operations/shell-operator.go]
  DBG Applying transformer [project name] to file [operations/shell-operator.go]
  INF Writing file .tmp/go/my-go-project/operations/shell-operator.go
  DBG Applying transformer [project package] to file [operations/shell-operator_test.go]
  DBG Applying transformer [project name] to file [operations/shell-operator_test.go]
  INF Writing file .tmp/go/my-go-project/operations/shell-operator_test.go
  DBG Applying transformer [project package] to file [reader/reader.go]
  DBG Applying transformer [project name] to file [reader/reader.go]
  INF Writing file .tmp/go/my-go-project/reader/reader.go
  DBG Applying transformer [project package] to file [reader/reader_test.go]
  DBG Applying transformer [project name] to file [reader/reader_test.go]
  INF Writing file .tmp/go/my-go-project/reader/reader_test.go
  DBG Applying transformer [project package] to file [template/condition-evaluator.go]
  DBG Applying transformer [project name] to file [template/condition-evaluator.go]
  INF Writing file .tmp/go/my-go-project/template/condition-evaluator.go
  DBG Applying transformer [project package] to file [template/condition-evaluator_test.go]
  DBG Applying transformer [project name] to file [template/condition-evaluator_test.go]
  INF Writing file .tmp/go/my-go-project/template/condition-evaluator_test.go
  DBG Applying transformer [project package] to file [template/template.go]
  DBG Applying transformer [project name] to file [template/template.go]
  INF Writing file .tmp/go/my-go-project/template/template.go
  DBG Applying transformer [project package] to file [template/template_test.go]
  DBG Applying transformer [project name] to file [template/template_test.go]
  INF Writing file .tmp/go/my-go-project/template/template_test.go
  DBG Ignoring file transformations.yml
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/include-transformer.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/include-transformer.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/include-transformer.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/include-transformer_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/include-transformer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/include-transformer_test.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/reader.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/reader.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/reader.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/reader_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/reader_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/reader_test.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/text-replacer.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/text-replacer.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/text-replacer.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/text-teplacer_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/text-teplacer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/text-teplacer_test.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformation.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformation.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformation.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformation_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformation_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformation_test.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformations-spec.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformations-spec.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformations-spec.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformer-selector.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformer-selector.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformer-selector.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformer-selector_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformer-selector_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformer-selector_test.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformer.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformer.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformer.go
  DBG Applying transformer [project package] to file [transformer/.tmp/yyy/transformer_test.go]
  DBG Applying transformer [project name] to file [transformer/.tmp/yyy/transformer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/.tmp/yyy/transformer_test.go
  DBG Applying transformer [project package] to file [transformer/include-transformer.go]
  DBG Applying transformer [project name] to file [transformer/include-transformer.go]
  INF Writing file .tmp/go/my-go-project/transformer/include-transformer.go
  DBG Applying transformer [project package] to file [transformer/include-transformer_test.go]
  DBG Applying transformer [project name] to file [transformer/include-transformer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/include-transformer_test.go
  DBG Applying transformer [project package] to file [transformer/reader.go]
  DBG Applying transformer [project name] to file [transformer/reader.go]
  INF Writing file .tmp/go/my-go-project/transformer/reader.go
  DBG Applying transformer [project package] to file [transformer/reader_test.go]
  DBG Applying transformer [project name] to file [transformer/reader_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/reader_test.go
  DBG Applying transformer [project package] to file [transformer/text-replacer.go]
  DBG Applying transformer [project name] to file [transformer/text-replacer.go]
  INF Writing file .tmp/go/my-go-project/transformer/text-replacer.go
  DBG Applying transformer [project package] to file [transformer/text-teplacer_test.go]
  DBG Applying transformer [project name] to file [transformer/text-teplacer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/text-teplacer_test.go
  DBG Applying transformer [project package] to file [transformer/transformation.go]
  DBG Applying transformer [project name] to file [transformer/transformation.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformation.go
  DBG Applying transformer [project package] to file [transformer/transformation_test.go]
  DBG Applying transformer [project name] to file [transformer/transformation_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformation_test.go
  DBG Applying transformer [project package] to file [transformer/transformations-spec.go]
  DBG Applying transformer [project name] to file [transformer/transformations-spec.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformations-spec.go
  DBG Applying transformer [project package] to file [transformer/transformer-selector.go]
  DBG Applying transformer [project name] to file [transformer/transformer-selector.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformer-selector.go
  DBG Applying transformer [project package] to file [transformer/transformer-selector_test.go]
  DBG Applying transformer [project name] to file [transformer/transformer-selector_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformer-selector_test.go
  DBG Applying transformer [project package] to file [transformer/transformer.go]
  DBG Applying transformer [project name] to file [transformer/transformer.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformer.go
  DBG Applying transformer [project package] to file [transformer/transformer_test.go]
  DBG Applying transformer [project name] to file [transformer/transformer_test.go]
  INF Writing file .tmp/go/my-go-project/transformer/transformer_test.go
  DBG Applying transformer [project package] to file [types/types.go]
  DBG Applying transformer [project name] to file [types/types.go]
  INF Writing file .tmp/go/my-go-project/types/types.go
  DBG Applying transformer [project package] to file [writer/writer.go]
  DBG Applying transformer [project name] to file [writer/writer.go]
  INF Writing file .tmp/go/my-go-project/writer/writer.go
  DBG Applying transformer [project package] to file [writer/writer_test.go]
  DBG Applying transformer [project name] to file [writer/writer_test.go]
  INF Writing file .tmp/go/my-go-project/writer/writer_test.go
  INF Running command: echo Done archetyping from . to .tmp/go/my-go-project of project my-go-project
  INF Output: Done archetyping from . to .tmp/go/my-go-project of project my-go-project

cd .tmp/go/my-go-project &&\
        make
go build ./...
go test -cover -race ./...
?       github.com/xxx/yyy  [no test files]
?       github.com/xxx/yyy/cmd  [no test files]
?       github.com/xxx/yyy/generator    [no test files]
ok      github.com/xxx/yyy/inputs   2.696s  coverage: 58.8% of statements
?       github.com/xxx/yyy/log  [no test files]
ok      github.com/xxx/yyy/operations   2.230s  coverage: 96.8% of statements
ok      github.com/xxx/yyy/reader   1.190s  coverage: 20.0% of statements
ok      github.com/xxx/yyy/template 1.675s  coverage: 92.9% of statements
--- FAIL: TestRead (0.00s)
    reader_test.go:14:
            Error Trace:    reader_test.go:14
            Error:          Received unexpected error:
                            open ../transformations.yml: no such file or directory
            Test:           TestRead
FAIL
coverage: 73.4% of statements
FAIL    github.com/xxx/yyy/transformer  3.063s
?       github.com/xxx/yyy/types    [no test files]
ok      github.com/xxx/yyy/writer   1.280s  coverage: 90.9% of statements
FAIL
make[1]: *** [test] Error 1
make: *** [test-template] Error 2
titusjaka commented 2 years ago

Sure, I'll fix it shortly 🤓

titusjaka commented 2 years ago

Done 🤓

rantav commented 2 years ago

Alright LGTM, thanks for this!

rantav commented 2 years ago

And released https://github.com/rantav/go-archetype/releases/tag/v0.1.12

titusjaka commented 2 years ago

Super, thank you ❤️