You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go application development tool applying modern practices.
The mga tool is an experimental collection of tools and practices related to developing Go applications.
Its goal is to make the maintenance of applications, thus the life of developers easier.
⚠️ This tool is still under heavy development! Things may change. ⚠️
Currently it includes code generators and scaffolding tools:
Download a prebuilt binary from the Releases page,
or install the tool from source:
go get sagikazarmark.dev/mga
Usage
Endpoint generator
An endpoint can be generated based on a service interface:
package my
import (
"context"
)
// +kit:endpoint// Service is a business service.typeServiceinterface{
// DoSomething is a service call.//// Named parameters and results are optional, but they make the generated code nicer.DoSomething(ctx context.Context, myparamstring) (idstring, errerror)
}
package my
// +testify:mock// Service is a business service.typeServiceinterface{}
// +testify:mock:testOnly=true// Service2 is a business service.typeService2interface{}