Skip to content

convert powershell code generators to use go generate #55

Description

@plastikfan

See: go generate design

The powershell script is a bit of a fly in the ointment for this project as it requires any dev to know powershell pretty well in order to update the generators. These 2 skill sets are not particularly correlated, so code generation should be done in the Golang domain

This is not really that important, but would be a good task to work on to learn another aspect of Go development.

For a code generation reference, see: go-i18n codegen

Template resources:

Tasks:

  • create skeleton go generator #189
  • generate option-validator-auto #191
  • define a template file for each output, ie, there are currently 6 auto generated go files, eg option-validator-auto.go, so there should be a template file for each one of these.
  • define a template file for each snippet (this may conflict with the above task!)
  • implement check-sig #194
  • equalise the sha256 hashing between PowerShell and Go versions. There is no reasons why these hashes don't match if they use the same hashing algorithm. Make sure that the inputs to both are exactly the same. Currently, there may be a difference due to presence newline/carriage return, which differs between window/linux

To help in viewing template files (*.tmpl), set the language of these files to go, set in vscode settings (this sets the colour highlighting according to go and also sets the file icon type):

  "files.associations": {
    "**/*.tmpl": "go"
  }

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions