Giter Site home page Giter Site logo

goanno's Introduction

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

goanno's People

Contributors

loveinsky100 avatar david990917 avatar xdpcs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.