Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add private documentation to references #47

Open
arp242 opened this issue Aug 31, 2018 · 4 comments
Open

Ability to add private documentation to references #47

arp242 opened this issue Aug 31, 2018 · 4 comments

Comments

@arp242
Copy link
Contributor

arp242 commented Aug 31, 2018

Right now all the godoc comments for references are added to the Kommentaar output. Sometimes it might be useful to have just some internal/private notes.

I can't really think of an elegant way of doing that. Only way I can think of is something along the lines of:

// Foo is a bar.
//
// {private}
// Not in Kommentaar output.
type Foo struct {
    // Public stuff.
    //
    // {private}
    // This is not in the Kommentaar output.
    Name
}

but I can't say I'm especially impressed by that. Alternatives to {private} might be ---, or something else.

Need to think about it. Suggestions welcome.

@ripexz
Copy link
Member

ripexz commented Aug 31, 2018

Could do //- rather than // for lines that should not be public? 🤔
At least that's what Pug does - // get rendered as HTML comments whereas //- don't 😊

So something like

// Foo is a bar.
//
//- Not in Kommentaar output.
type Foo struct {
    // Public stuff.
    //
    //- This is not in the Kommentaar output.
    // This is in Kommentaar output again.
    Name string
}

@arp242
Copy link
Contributor Author

arp242 commented Sep 3, 2018

Maybe; but it looks kinda meh in godoc though, especially with multiple lines on the struct.

2018-09-03-152244_975x429_scrot

@arp242
Copy link
Contributor Author

arp242 commented Sep 3, 2018

A simple "private" keyword is probably best:

// Foo is a bar.
//
// private: This documentation is private.
// And will not be added
// to Kommentaar.
type Foo struct {
	// Public stuff.
	//
	// private: This is not in the Kommentaar output.
	// but is private.
	// Good stuff!
	Name string
}

2018-09-03-152803_791x398_scrot

@ripexz
Copy link
Member

ripexz commented Sep 3, 2018

I don't mind either way, was just a suggestion 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants