From 619a24d17e1818b5b5d306f3c272431db4b253d9 Mon Sep 17 00:00:00 2001 From: Jonathan Vuillemin Date: Thu, 11 Jan 2024 11:36:48 +0100 Subject: [PATCH] feat(fxgenerate): Provided module --- .github/workflows/coverage.yml | 1 + .github/workflows/fxgenerate-ci.yml | 31 ++++ README.md | 16 +- fxgenerate/.golangci.yml | 66 ++++++++ fxgenerate/README.md | 143 ++++++++++++++++++ fxgenerate/fxgeneratetest/uuid/factory.go | 30 ++++ .../fxgeneratetest/uuid/factory_test.go | 36 +++++ fxgenerate/go.mod | 22 +++ fxgenerate/go.sum | 41 +++++ fxgenerate/module.go | 31 ++++ fxgenerate/module_test.go | 58 +++++++ fxgenerate/testdata/uuid/factory.go | 16 ++ release-please-config.json | 5 + 13 files changed, 490 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/fxgenerate-ci.yml create mode 100644 fxgenerate/.golangci.yml create mode 100644 fxgenerate/README.md create mode 100644 fxgenerate/fxgeneratetest/uuid/factory.go create mode 100644 fxgenerate/fxgeneratetest/uuid/factory_test.go create mode 100644 fxgenerate/go.mod create mode 100644 fxgenerate/go.sum create mode 100644 fxgenerate/module.go create mode 100644 fxgenerate/module_test.go create mode 100644 fxgenerate/testdata/uuid/factory.go diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 78f9f84..799e651 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -30,6 +30,7 @@ jobs: - "orm" - "trace" - "fxconfig" + - "fxgenerate" steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/fxgenerate-ci.yml b/.github/workflows/fxgenerate-ci.yml new file mode 100644 index 0000000..4a8a6ef --- /dev/null +++ b/.github/workflows/fxgenerate-ci.yml @@ -0,0 +1,31 @@ +name: "fxgenerate-ci" + +on: + push: + branches: + - "feat**" + - "fix**" + - "hotfix**" + - "chore**" + paths: + - "fxgenerate/**.go" + - "fxgenerate/go.mod" + - "fxgenerate/go.sum" + pull_request: + types: + - opened + - synchronize + - reopened + branches: + - main + paths: + - "fxgenerate/**.go" + - "fxgenerate/go.mod" + - "fxgenerate/go.sum" + +jobs: + ci: + uses: ./.github/workflows/common-ci.yml + secrets: inherit + with: + module: "fxgenerate" diff --git a/README.md b/README.md index f088a16..8150a79 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,20 @@ Yokai's documentation will be available soon. ## Fx Modules -Yokai is using [Fx](https://github.com/uber-go/fx) for its plugin system. +Yokai's `Fx modules` are the plugins for your Yokai application. -`Yokai's Fx modules` are the plugins for your Yokai application, but they can be used in any [Fx](https://github.com/uber-go/fx) based Go application. +Yokai is using [Fx](https://github.com/uber-go/fx) for its plugin system. -| Fx Module | Description | -|----------------------|--------------------------------| -| [fxconfig](fxconfig) | Fx module for [config](config) | +| Fx Module | Description | +|--------------------------|------------------------------------| +| [fxconfig](fxconfig) | Fx module for [config](config) | +| [fxgenerate](fxgenerate) | Fx module for [generate](generate) | +They can also be used in any [Fx](https://github.com/uber-go/fx) based Go application. ## Modules -`Yokai's modules` are the foundation of the framework, but they can be used in any Go application (no Yokai dependencies). +Yokai's `modules` are the foundation of the framework. | Module | Description | |----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -40,6 +42,8 @@ Yokai is using [Fx](https://github.com/uber-go/fx) for its plugin system. | [orm](orm) | ORM module based on [Gorm](https://gorm.io/) | | [trace](trace) | Tracing module based on [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-go) | +They can also be used in any Go application (no Yokai or [Fx](https://github.com/uber-go/fx) dependencies). + ## Contributing This repository uses [release-please](https://github.com/googleapis/release-please) to automate Yokai's modules release process. diff --git a/fxgenerate/.golangci.yml b/fxgenerate/.golangci.yml new file mode 100644 index 0000000..edf0e9e --- /dev/null +++ b/fxgenerate/.golangci.yml @@ -0,0 +1,66 @@ +run: + timeout: 5m + concurrency: 8 + +linters: + enable: + - asasalint + - asciicheck + - bidichk + - bodyclose + - containedctx + - contextcheck + - cyclop + - decorder + - dogsled + - dupl + - durationcheck + - errcheck + - errchkjson + - errname + - errorlint + - exhaustive + - forbidigo + - forcetypeassert + - gocognit + - goconst + - gocritic + - gocyclo + - godot + - godox + - gofmt + - goheader + - gomoddirectives + - gomodguard + - goprintffuncname + - gosec + - gosimple + - govet + - grouper + - importas + - ineffassign + - interfacebloat + - logrlint + - maintidx + - makezero + - misspell + - nestif + - nilerr + - nilnil + - nlreturn + - nolintlint + - nosprintfhostport + - prealloc + - predeclared + - promlinter + - reassign + - staticcheck + - tenv + - thelper + - tparallel + - typecheck + - unconvert + - unparam + - unused + - usestdlibvars + - whitespace diff --git a/fxgenerate/README.md b/fxgenerate/README.md new file mode 100644 index 0000000..a1e5384 --- /dev/null +++ b/fxgenerate/README.md @@ -0,0 +1,143 @@ +# Fx Generate Module + +[![ci](https://github.com/ankorstore/yokai/actions/workflows/fxgenerate-ci.yml/badge.svg)](https://github.com/ankorstore/yokai/actions/workflows/fxgenerate-ci.yml) +[![go report](https://goreportcard.com/badge/github.com/ankorstore/yokai/fxgenerate)](https://goreportcard.com/report/github.com/ankorstore/yokai/fxgenerate) +[![codecov](https://codecov.io/gh/ankorstore/yokai/graph/badge.svg?token=ghUBlFsjhR&flag=fxgenerate)](https://app.codecov.io/gh/ankorstore/yokai/tree/main/fxgenerate) +[![Deps](https://img.shields.io/badge/osi-deps-blue)](https://deps.dev/go/github.com%2Fankorstore%2Fyokai%2Ffxgenerate) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/ankorstore/yokai/fxgenerate)](https://pkg.go.dev/github.com/ankorstore/yokai/fxgenerate) + +> [Fx](https://uber-go.github.io/fx/) module for [generate](https://github.com/ankorstore/yokai/tree/main/generate). + + +* [Installation](#installation) +* [Documentation](#documentation) + * [Loading](#loading) + * [Generators](#generators) + * [UUID](#uuid) + * [Usage](#usage) + * [Testing](#testing) + * [Override](#override) + + +## Installation + +```shell +go get github.com/ankorstore/yokai/fxgenerate +``` + +## Documentation + +### Loading + +To load the module in your Fx application: + +```go +package main + +import ( + "github.com/ankorstore/yokai/fxgenerate" + "go.uber.org/fx" +) + +func main() { + fx.New(fxgenerate.FxGenerateModule).Run() +} +``` + +### Generators + +#### UUID + +##### Usage + +This module provides a [UuidGenerator](https://github.com/ankorstore/yokai/blob/main/generate/uuid/generator.go), made available into the Fx container. + +```go +package main + +import ( + "fmt" + + "github.com/ankorstore/yokai/generate/uuid" + "github.com/ankorstore/yokai/fxgenerate" + "go.uber.org/fx" +) + +func main() { + fx.New( + fxgenerate.FxGenerateModule, // load the module + fx.Invoke(func(generator *uuid.UuidGenerator) { // invoke the uuid generator + fmt.Printf("uuid: %s", generator.Generate()) // uuid: dcb5d8b3-4517-4957-a42c-604d11758561 + }), + ).Run() +} +``` + +##### Testing + +This module provides the possibility to make your [UuidGenerator](https://github.com/ankorstore/yokai/blob/main/generate/uuid/generator.go) generate deterministic values, for testing purposes. + +You need to: + +- first provide into the Fx container the deterministic value to be used for generation, annotated with `name:"generate-test-uuid-value"` +- then decorate into the Fx container the `UuidGeneratorFactory` with the provided [TestUuidGeneratorFactory](fxgeneratetest/uuid/factory.go) + +```go +package main + +import ( + "fmt" + + "github.com/ankorstore/yokai/fxgenerate" + fxtestuuid "github.com/ankorstore/yokai/fxgenerate/fxgeneratetest/uuid" + "github.com/ankorstore/yokai/generate/uuid" + "go.uber.org/fx" +) + +func main() { + fx.New( + fxgenerate.FxGenerateModule, // load the module + fx.Provide( // provide and annotate the deterministic value + fx.Annotate( + func() string { + return "some deterministic value" + }, + fx.ResultTags(`name:"generate-test-uuid-value"`), + ), + ), + fx.Decorate(fxtestuuid.NewFxTestUuidGeneratorFactory), // override the module with the TestUuidGeneratorFactory + fx.Invoke(func(generator *uuid.UuidGenerator) { // invoke the generator + fmt.Printf("uuid: %s", generator.Generate()) // uuid: some deterministic value + }), + ).Run() +} +``` + +### Override + +By default, the `uuid.UuidGenerator` is created by the [DefaultUuidGeneratorFactory](https://github.com/ankorstore/yokai/blob/main/generate/uuid/factory.go). + +If needed, you can provide your own factory and override the module: + +```go +package main + +import ( + "fmt" + + "github.com/ankorstore/yokai/fxgenerate" + testuuid "github.com/ankorstore/yokai/fxgenerate/testdata/uuid" + "github.com/ankorstore/yokai/generate/uuid" + "go.uber.org/fx" +) + +func main() { + fx.New( + fxgenerate.FxGenerateModule, // load the module + fx.Decorate(testuuid.NewTestStaticUuidGeneratorFactory), // override the module with a custom factory + fx.Invoke(func(generator *uuid.UuidGenerator) { // invoke the custom generator + fmt.Printf("uuid: %s", generator.Generate()) // uuid: static + }), + ).Run() +} +``` diff --git a/fxgenerate/fxgeneratetest/uuid/factory.go b/fxgenerate/fxgeneratetest/uuid/factory.go new file mode 100644 index 0000000..a1fbcae --- /dev/null +++ b/fxgenerate/fxgeneratetest/uuid/factory.go @@ -0,0 +1,30 @@ +package uuid + +import ( + uuidtest "github.com/ankorstore/yokai/generate/generatetest/uuid" + "github.com/ankorstore/yokai/generate/uuid" + "go.uber.org/fx" +) + +// FxTestUuidGeneratorFactoryParam is used to retrieve the provided generate-test-uuid-value from Fx. +type FxTestUuidGeneratorFactoryParam struct { + fx.In + Value string `name:"generate-test-uuid-value"` +} + +// TestUuidGeneratorFactory is a [uuid.UuidGeneratorFactory] implementation. +type TestUuidGeneratorFactory struct { + value string +} + +// NewFxTestUuidGeneratorFactory returns a new [TestUuidGeneratorFactory], implementing [uuid.UuidGeneratorFactory]. +func NewFxTestUuidGeneratorFactory(p FxTestUuidGeneratorFactoryParam) uuid.UuidGeneratorFactory { + return &TestUuidGeneratorFactory{ + value: p.Value, + } +} + +// Create returns a new [uuid.UuidGenerator]. +func (f *TestUuidGeneratorFactory) Create() uuid.UuidGenerator { + return uuidtest.NewTestUuidGenerator(f.value) +} diff --git a/fxgenerate/fxgeneratetest/uuid/factory_test.go b/fxgenerate/fxgeneratetest/uuid/factory_test.go new file mode 100644 index 0000000..16f5188 --- /dev/null +++ b/fxgenerate/fxgeneratetest/uuid/factory_test.go @@ -0,0 +1,36 @@ +package uuid_test + +import ( + "testing" + + "github.com/ankorstore/yokai/fxgenerate" + fxgeneratetestuuid "github.com/ankorstore/yokai/fxgenerate/fxgeneratetest/uuid" + "github.com/ankorstore/yokai/generate/uuid" + "github.com/stretchr/testify/assert" + "go.uber.org/fx" + "go.uber.org/fx/fxtest" +) + +func TestTestUuidGenerator(t *testing.T) { + t.Parallel() + + var generator uuid.UuidGenerator + + fxtest.New( + t, + fx.NopLogger, + fxgenerate.FxGenerateModule, + fx.Provide( + fx.Annotate( + func() string { + return "some test value" + }, + fx.ResultTags(`name:"generate-test-uuid-value"`), + ), + ), + fx.Decorate(fxgeneratetestuuid.NewFxTestUuidGeneratorFactory), + fx.Populate(&generator), + ).RequireStart().RequireStop() + + assert.Equal(t, "some test value", generator.Generate()) +} diff --git a/fxgenerate/go.mod b/fxgenerate/go.mod new file mode 100644 index 0000000..e19f6f7 --- /dev/null +++ b/fxgenerate/go.mod @@ -0,0 +1,22 @@ +module github.com/ankorstore/yokai/fxgenerate + +go 1.20 + +require ( + github.com/ankorstore/yokai/generate v1.0.0 + github.com/google/uuid v1.5.0 + github.com/stretchr/testify v1.8.4 + go.uber.org/fx v1.20.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/dig v1.17.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.23.0 // indirect + golang.org/x/sys v0.8.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/fxgenerate/go.sum b/fxgenerate/go.sum new file mode 100644 index 0000000..d415fd4 --- /dev/null +++ b/fxgenerate/go.sum @@ -0,0 +1,41 @@ +github.com/ankorstore/yokai/generate v1.0.0 h1:kHpbl8cet9qklUamMqSTJy3h6aiybKMgnAK6dDI42p8= +github.com/ankorstore/yokai/generate v1.0.0/go.mod h1:7/gebXdxAOmqeDG54RcguC0a+f3JtqEKVKtSy8f2dlk= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= +go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU= +go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= +go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0= +go.uber.org/fx v1.20.1 h1:zVwVQGS8zYvhh9Xxcu4w1M6ESyeMzebzj2NbSayZ4Mk= +go.uber.org/fx v1.20.1/go.mod h1:iSYNbHf2y55acNCwCXKx7LbWb5WG1Bnue5RDXz1OREg= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/fxgenerate/module.go b/fxgenerate/module.go new file mode 100644 index 0000000..0cd13a7 --- /dev/null +++ b/fxgenerate/module.go @@ -0,0 +1,31 @@ +package fxgenerate + +import ( + "github.com/ankorstore/yokai/generate/uuid" + "go.uber.org/fx" +) + +// ModuleName is the module name. +const ModuleName = "generate" + +// FxGenerateModule is the [Fx] generate module. +// +// [Fx]: https://github.com/uber-go/fx +var FxGenerateModule = fx.Module( + ModuleName, + fx.Provide( + uuid.NewDefaultUuidGeneratorFactory, + NewFxUuidGenerator, + ), +) + +// FxUuidGeneratorParam allows injection of the required dependencies in [NewFxUuidGenerator]. +type FxUuidGeneratorParam struct { + fx.In + Factory uuid.UuidGeneratorFactory +} + +// NewFxUuidGenerator returns a [uuid.UuidGenerator]. +func NewFxUuidGenerator(p FxUuidGeneratorParam) (uuid.UuidGenerator, error) { + return p.Factory.Create(), nil +} diff --git a/fxgenerate/module_test.go b/fxgenerate/module_test.go new file mode 100644 index 0000000..091b971 --- /dev/null +++ b/fxgenerate/module_test.go @@ -0,0 +1,58 @@ +package fxgenerate_test + +import ( + "testing" + + "github.com/ankorstore/yokai/fxgenerate" + testuuid "github.com/ankorstore/yokai/fxgenerate/testdata/uuid" + "github.com/ankorstore/yokai/generate/uuid" + googleuuid "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "go.uber.org/fx" + "go.uber.org/fx/fxtest" +) + +func TestModuleUuidGenerator(t *testing.T) { + t.Parallel() + + var generator uuid.UuidGenerator + + fxtest.New( + t, + fx.NopLogger, + fxgenerate.FxGenerateModule, + fx.Populate(&generator), + ).RequireStart().RequireStop() + + value1 := generator.Generate() + value2 := generator.Generate() + + assert.NotEqual(t, value1, value2) + + parsedValue1, err := googleuuid.Parse(value1) + assert.NoError(t, err) + + parsedValue2, err := googleuuid.Parse(value2) + assert.NoError(t, err) + + assert.NotEqual(t, parsedValue1.String(), parsedValue2.String()) + + assert.Equal(t, value1, parsedValue1.String()) + assert.Equal(t, value2, parsedValue2.String()) +} + +func TestModuleUuidGeneratorDecoration(t *testing.T) { + t.Parallel() + + var generator uuid.UuidGenerator + + fxtest.New( + t, + fx.NopLogger, + fxgenerate.FxGenerateModule, + fx.Decorate(testuuid.NewTestStaticUuidGeneratorFactory), + fx.Populate(&generator), + ).RequireStart().RequireStop() + + assert.Equal(t, "static", generator.Generate()) +} diff --git a/fxgenerate/testdata/uuid/factory.go b/fxgenerate/testdata/uuid/factory.go new file mode 100644 index 0000000..5313974 --- /dev/null +++ b/fxgenerate/testdata/uuid/factory.go @@ -0,0 +1,16 @@ +package uuid + +import ( + uuidtest "github.com/ankorstore/yokai/generate/generatetest/uuid" + "github.com/ankorstore/yokai/generate/uuid" +) + +type TestStaticUuidGeneratorFactory struct{} + +func NewTestStaticUuidGeneratorFactory() uuid.UuidGeneratorFactory { + return &TestStaticUuidGeneratorFactory{} +} + +func (f *TestStaticUuidGeneratorFactory) Create() uuid.UuidGenerator { + return uuidtest.NewTestUuidGenerator("static") +} diff --git a/release-please-config.json b/release-please-config.json index d78d45f..28f53f0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -45,6 +45,11 @@ "release-type": "go", "component": "fxconfig", "tag-separator": "/" + }, + "fxgenerate": { + "release-type": "go", + "component": "fxgenerate", + "tag-separator": "/" } } }