go-elasticsearch icon indicating copy to clipboard operation
go-elasticsearch copied to clipboard

It would be nice if comments were added to methods for intellisense

Open chanced opened this issue 3 years ago • 1 comments

Since the API is generated, I doubt this would be too big of a lift. Basically what I'm suggesting is adding comments on the fields of the structs themselves.

So instead of this: Screen Shot 2021-04-20 at 2 36 20 PM Adding the comments inline, such as:

// Indices contains the Indices APIs
type Indices struct {
	AddBlock              IndicesAddBlock
	Analyze               IndicesAnalyze
	ClearCache            IndicesClearCache
	Clone                 IndicesClone
	Close                 IndicesClose
	CreateDataStream      IndicesCreateDataStream
	// Creates an index with optional settings and mappings.
	//
	// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html.
	//
	Create                IndicesCreate

would yield: Screen Shot 2021-04-20 at 2 41 32 PM

Thank you for the package, by the way.

chanced avatar Apr 20 '21 18:04 chanced

That is a really cool idea, I'll tinker with the generator and will let you know !

Anaethelion avatar Apr 21 '21 17:04 Anaethelion