Skip to content

Releases: moznion/gowrtr

v1.7.0

22 Aug 08:15
2511448
Compare
Choose a tag to compare

What's changed

New Features

Expands the generics code generation #16

This library has already supported the generics syntax on only struct declaration.
This version expands the supported generics syntaxes/notations like the following:

  • generic types on function invocation like foo[int64](123)
  • generic parameter names on function receiver like func (s MyStruct[T])
  • generic parameter names on function return values like func foo[T struct]() MyStruct[T]
  • generic type parameters on interface declaration like type MyInterface[T any] interface {}

This patch also introduces TypeParameterNames which is an alias of []string to represent the generic parameter names, e.g. T.

And this patch makes it supports the generics union types.

Maintenance

  • Upgrade the go runtime to 1.19 #15
  • Use golangci-lint instead of golint and staticcheck #14
  • Adjust the type usage of TypeParameters #13

v1.6.0

30 Mar 07:00
417d6b7
Compare
Choose a tag to compare

What's Changed

New Features

  • Support the type parameters for go's generics at func and struct declarations @moznion (#11)

Maintenance

  • Use GItHub Actions instead of CircleCI @moznion (#12)

v1.5.1

22 Feb 10:08
07420ca
Compare
Choose a tag to compare

Bugfix

07420ca: Fix STDIN/STDOUT buffer issue on code generation with code formatters

There was a problem that it cannot generate code if the input size (i.e. raw generated code) is too big, because of the buffer of the OS.
This commit fixes that problem by using exec.Cmd#StdinPipe() and removes some redundant/unsophisticated code.

As far as I checked, this problem appeared on only Linux.

v1.5.0

31 May 14:07
78541c0
Compare
Choose a tag to compare

Minor breaking change

  • split lines when passed more than one argument with different types #9

This change doesn't break the behavior of the generated code, but it changes the style of code around the function parameters.

v1.4.1

19 Jan 14:05
8b6a5a6
Compare
Choose a tag to compare

Minor changes

v1.4.0

19 Jan 13:01
308afd2
Compare
Choose a tag to compare

Rename: s/ReturnTypeStructs/ReturnTypeStatements/g

v1.3.0

21 Jan 08:58
08e30cf
Compare
Choose a tag to compare

Improvements

  • Support named return types on FuncSignature (#3)

v1.2.0

19 Jan 14:47
a37fc26
Compare
Choose a tag to compare

Improvements

v1.1.0

17 Jan 16:41
7fd65ac
Compare
Choose a tag to compare

Breaking Changes

struct fields of each generator to be private

Change method interfaces

AnonymousFunc

  • SetFuncInvocation() -> Invocation()

AnonymousFuncSignature

  • AddFuncParameters() -> AddParameters()

FuncSignature

  • AddFuncParameters() -> AddParameters()

If

  • AddElseIfBlocks() -> AddElseIf()
  • SetElseBlock() -> Else()

Interface

  • AddFuncSignatures() -> AddSignatures()

Root

  • EnableGofmt() -> Gofmt()
  • EnableGoimports() -> Goimports()

Switch

  • AddCaseStatements() -> AddCase()
  • SetDefaultStatement() -> Default()

Changes

Add setter methods

AnonymousFunc

  • Statements()

AnonymousFuncSignature

  • Parameters()
  • ReturnTypes()

Case

  • Statements()

CodeBlock

  • Statements()

DefaultCase

  • Statements()

Else

  • Statements()

ElseIf

  • Statements()

For

  • Statements()

Func

  • Statements()

FuncInvocation

  • Parameters()

FuncSignature

  • Parameters()
  • ReturnTypes()

If

  • Statements()
  • ElseIf()

Import

  • Imports()

Interface

  • Signatures()

ReturnStatement

  • ReturnItems()

Root

  • Statements()
  • Case()

v1.0.0

14 Jan 02:43
34e3b5d
Compare
Choose a tag to compare

Original Release