Skip to content

How to add XML documentation to classes? #96

Answered by Splizard
hmrrrrr asked this question in Q&A
Discussion options

You must be logged in to vote

I've prepared an example for this, turned out there was some issues with the documentation generation that I've resolved and I've also added support for methods.

https://github.com/grow-graphics/eg/blob/master/1d/documentation/documentation.go

package main

import (
	"graphics.gd/classdb"
	"graphics.gd/startup"
	"graphics.gd/variant/Object"
)

type ClassWithDocumentation struct {
	classdb.Extension[ClassWithDocumentation, Object.Instance] `gd:"ClassWithDocumentation"
		serves as an example of how to document a class in Go code.`

	MyField int `gd:"my_field"
		can store an integer value.`
}

func (c *ClassWithDocumentation) MyMethod() {}

func main() {
	classdb.Register[ClassWithDocumentation

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Splizard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants