golds icon indicating copy to clipboard operation
golds copied to clipboard

suggestion: make style similar to godoc

Open SVilgelm opened this issue 3 years ago • 11 comments

It would be great to have a style same, or very similar, as godoc. Most people are familiar with that style and I faced an issue when I had to explain to people that the exported methods are expandable and they can see more documentation after clicking a plus sign.

SVilgelm avatar Jan 14 '21 17:01 SVilgelm

Do you mean many people expect that the docs of methods should be all expanded initially?

zigo101 avatar Jan 15 '21 17:01 zigo101

I mean many people are already familiar with the style, that godoc or pkg.go.doc use, and they expected something similar

SVilgelm avatar Jan 15 '21 17:01 SVilgelm

It is hard to make their styles very alike, for godoc provides much less information for types than golds. In fact, godoc only lists methods as the only property of types. (Whereas golds lists fields, asOutputsOfFunctions, asInputsOfFunctions and asTypesOfValues as well.)

One the other hand, they could be more similar later than now in some extend. The things I can think of may be made to increase the similarity are:

  • add an index section
  • always expand the current collapsed content
  • show code examples

Do you think these will help? Or do you have any other ideas to increase the similarity?

zigo101 avatar Jan 15 '21 18:01 zigo101

Index would be nice. Also bigger font maybe. Matching the font at https://golang.org/pkg/ (Roboto 16px, 1.3em line height)

ffmiruz avatar Jan 28 '21 15:01 ffmiruz

v0.2.0 is released with some UE adjustments and several small new features.

zigo101 avatar Mar 09 '21 16:03 zigo101

I actually like this style more! It is good to have some alternative to godoc! Albeit, lately pkg.go.dev is just outstanding, something like it would be amazing.

nikolaydubina avatar Feb 19 '22 16:02 nikolaydubina

this is not exactly the old style, but its much similar than the current Golds incarnation:

https://github.com/abhinav/doc2go

3052 avatar Jan 20 '24 22:01 3052

@3052 I admit Golds is still far to perfection, but Golds has too many differences from godoc that it is hard to make their UI style very similar.

Golds was mainly developed for my own need: study some Go projects by reading their code. Generating package public APIs is more a by-product.

For lack of enough spare time and I don't see a bright future for Go any more, I will spend much less time on this project, especially on adjusting the UI style. I'm sorry for this. Everybody can fork this project to make changes according their needs.

zigo101 avatar Jan 22 '24 08:01 zigo101

For lack of enough spare time and I don't see a bright future for Go any more, I will spend much less time on this project, especially on adjusting the UI style.

in that case, make me owner of https://github.com/go101/golds, and I can address the issues

3052 avatar Jan 22 '24 12:01 3052

You can fork it and do whatever you want. :)

zigo101 avatar Jan 22 '24 15:01 zigo101

too much effort. I will just continue to use Doc2Go

3052 avatar Jan 22 '24 16:01 3052