Goanno Save

Auto generate comment for golang/golang自动生成函数注释插件

Project README

goanno

Goanno is a plugin for goland
This plugin provides auto generate comments for golang

How to install

1.goland plugins marketplace(search Goanno)
2.download release jar(goland install from disk) goanno.jar

How to use

1.control + command + / (for windows: control + alt + /)
2.Right click -> Generate -> Goanno
3.Edit comment template

  • 1.Select "Tools - Goanno Setting"
  • 2.Edit template

Change log

  • V2.1.0
    • support edit custom template
  • V3.0.0
    • support different scene template
    • support old comment convert
  • V3.1.0 at 2022-08-24
    • support template export/import

Template

Args Desc
${todo} Blank Placeholder
${receiver} function receiver name or type
${params} function params name or type
${return_types} function output name or type
${function_name} function name
${date} yyyy-MM-dd HH:mm:ss

V2.1.0

Args Desc
${todo} Blank Placeholder
${receiver} function receiver name or type
${params} function params name or type
${return_types} function output name or type
${function_name} function name
${param_name} function params name
${param_type} function params type
${param_name_type} function params name and type
${receiver_name} function receiver name
${receiver_type} function receiver type
${receiver_name_type} function receiver name and type
${ret} function output name or type, equals to ${return_types}
${ret_name} function output name
${ret_type} function output type
${ret_name_type} return name and type
${note} previous comments (NOT SUPPORT, dev...)

V3.0.0

New Config Support

Args Desc
${interface_name} Name of Interface
${struct_name} Name of Struct
${struct_field_name} Name of Struct Field
${package_name} Name of Package

Suggest Templates
java style(default)

/*
 * @Description: ${todo}
 * @receiver ${receiver}
 * @param ${params}
 * @return ${return_types}
 */

golang style

//
// @Description: ${todo}
// @receiver ${receiver}
// @param ${params}
// @return ${return_types}
//

V2.2.0

Supports rewrite previous comments / 支持覆盖原有注释

Setting: "Tools - Goanno Setting - Select Checkbox"

How to build

Project SDK: IntelliJ IDEA Community Edition IC-202.8194.7
JDK: 1.8
IDEA Version: IntelliJ IDEA 2020.2.4 (Community Edition)

Tip: Do not use 2020.3

Test File:

resource
    - test.go
    - test2.go
src/org/leo/goanno/test
    - GenerateTest.java

Preview

Open Source Agenda is not affiliated with "Goanno" Project. README Source: loveinsky100/goanno
Stars
134
Open Issues
17
Last Commit
11 months ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating