diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..3b717bc7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.go] +indent_size = 4 +indent_style = tab + +[Makefile] +indent_style = tab diff --git a/Makefile b/Makefile index 4eea8ca2..16c01f03 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,9 @@ build-http: ### Generating commands gen: go run ./internal/generator/main.go \ - "./internal/engine/command/crowdfund/crowdfund.yml" "./internal/engine/command/market/market.yml" + "./internal/engine/command/crowdfund/crowdfund.yml" \ + "./internal/engine/command/market/market.yml" + find . -name "*.gen.go" -exec gofumpt -l -w {} + ### diff --git a/config/config.sample.yml b/config/config.sample.yml index fba64ace..8414ca65 100644 --- a/config/config.sample.yml +++ b/config/config.sample.yml @@ -81,4 +81,4 @@ logger: max_size: 10 # Maximum size (in MB) of the log file before rotation. max_backups: 10 # Maximum number of backup log files to retain. compress: true # Compress old log files. - targets: [file, console] # Logging targets: file, console, or both. \ No newline at end of file + targets: [file, console] # Logging targets: file, console, or both. diff --git a/internal/engine/command/crowdfund/crowdfund.gen.go b/internal/engine/command/crowdfund/crowdfund.gen.go index ed1aaf85..53283510 100644 --- a/internal/engine/command/crowdfund/crowdfund.gen.go +++ b/internal/engine/command/crowdfund/crowdfund.gen.go @@ -5,19 +5,21 @@ import ( "github.com/pagu-project/pagu/internal/engine/command" ) -const argNameCreateTitle = "title" -const argNameCreateDesc = "desc" -const argNameCreatePackages = "packages" -const argNamePurchasePackage = "package" -const argNameClaimAddress = "address" +const ( + argNameCreateTitle = "title" + argNameCreateDesc = "desc" + argNameCreatePackages = "packages" + argNamePurchasePackage = "package" + argNameClaimAddress = "address" +) type crowdfundSubCmds struct { - subCmdCreate *command.Command - subCmdDisable *command.Command - subCmdReport *command.Command - subCmdInfo *command.Command + subCmdCreate *command.Command + subCmdDisable *command.Command + subCmdReport *command.Command + subCmdInfo *command.Command subCmdPurchase *command.Command - subCmdClaim *command.Command + subCmdClaim *command.Command } func (c *CrowdfundCmd) buildSubCmds() *crowdfundSubCmds { @@ -95,12 +97,12 @@ func (c *CrowdfundCmd) buildSubCmds() *crowdfundSubCmds { } return &crowdfundSubCmds{ - subCmdCreate: subCmdCreate, - subCmdDisable: subCmdDisable, - subCmdReport: subCmdReport, - subCmdInfo: subCmdInfo, + subCmdCreate: subCmdCreate, + subCmdDisable: subCmdDisable, + subCmdReport: subCmdReport, + subCmdInfo: subCmdInfo, subCmdPurchase: subCmdPurchase, - subCmdClaim: subCmdClaim, + subCmdClaim: subCmdClaim, } } diff --git a/internal/engine/command/market/market.gen.go b/internal/engine/command/market/market.gen.go index 8d1c1b3d..e2bd1d2c 100644 --- a/internal/engine/command/market/market.gen.go +++ b/internal/engine/command/market/market.gen.go @@ -5,7 +5,6 @@ import ( "github.com/pagu-project/pagu/internal/engine/command" ) - type marketSubCmds struct { subCmdPrice *command.Command } diff --git a/internal/engine/command/market/market.yml b/internal/engine/command/market/market.yml index 8c315c5c..8c602a3c 100644 --- a/internal/engine/command/market/market.yml +++ b/internal/engine/command/market/market.yml @@ -9,4 +9,4 @@ sub_commands: https://xeggex.com/market/PACTUS_USDT Azbit Price: **{{.azbitPrice}} USDT** - https://azbit.com/exchange/PAC_USDT \ No newline at end of file + https://azbit.com/exchange/PAC_USDT