FAQ
Hello,

Apologies if I'm asking a question that's been answered, or is easy to
find... I've not found the right documentation yet.

I'm trying to find the best way to preview the comments of my code as it
would appear when parsed by godoc. The problem is that I'd like to view it
when in http server mode, and can't seem to find a way to do that. Is this
possible?

I've seen how to dump it in plain text. However, when doing that my
function-specific Examples don't show up even with "-ex=true".

Thanks in advance!

Cheers!
-TIm

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Dave Cheney at Nov 20, 2014 at 7:21 am
    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as it
    would appear when parsed by godoc. The problem is that I'd like to view it
    when in http server mode, and can't seem to find a way to do that. Is this
    possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Dmitri S at Nov 20, 2014 at 9:56 am
    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry
    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as it
    would appear when parsed by godoc. The problem is that I'd like to view it
    when in http server mode, and can't seem to find a way to do that. Is this
    possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Dave Cheney at Nov 20, 2014 at 9:57 am
    That's probably about the best that can be done for now. I don't think
    it's a common use case.
    On Thu, Nov 20, 2014 at 8:56 PM, Dmitri S wrote:
    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry

    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as it
    would appear when parsed by godoc. The problem is that I'd like to view it
    when in http server mode, and can't seem to find a way to do that. Is this
    possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/PfoFk9jVc58/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Uli Kunitz at Nov 20, 2014 at 5:43 pm
    If you have all your company packages in one sub-directory, you could link
    directly to that directory.

    While crypto is a rather small package, the godoc page has all
    subdirectories listed:

    http://golang.org/pkg/crypto

    On Thursday, November 20, 2014 10:56:10 AM UTC+1, Dmitri S wrote:

    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry
    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as it
    would appear when parsed by godoc. The problem is that I'd like to view it
    when in http server mode, and can't seem to find a way to do that. Is this
    possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Carlos Castillo at Nov 20, 2014 at 9:35 pm
    Not having the stdlib there presents a problem where any links to stdlib
    classes won't exist / work.
    On Thursday, November 20, 2014 1:56:10 AM UTC-8, Dmitri S wrote:

    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry
    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as it
    would appear when parsed by godoc. The problem is that I'd like to view it
    when in http server mode, and can't seem to find a way to do that. Is this
    possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tim Heckman at Nov 20, 2014 at 10:44 pm
    I'm okay with the standard lib still being there. I'm just trying to also
    have it render my local project if possible. I really only want to make
    sure I am formatting my comments properly so that godoc can read them.

    Also, does anyone have any ideas on how to preview the examples?

    Cheers!
    -Tim
    On Thursday, November 20, 2014 1:35:49 PM UTC-8, Carlos Castillo wrote:

    Not having the stdlib there presents a problem where any links to stdlib
    classes won't exist / work.
    On Thursday, November 20, 2014 1:56:10 AM UTC-8, Dmitri S wrote:

    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry
    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as
    it would appear when parsed by godoc. The problem is that I'd like to view
    it when in http server mode, and can't seem to find a way to do that. Is
    this possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Volker Dobler at Nov 20, 2014 at 11:55 pm

    Am Donnerstag, 20. November 2014 23:44:54 UTC+1 schrieb Tim Heckman:
    [...]
    Also, does anyone have any ideas on how to preview the examples?
    I didn't know they could be turned off.
    The godoc web interface _will_ show your examples,
    only the command line mode need -ex to display them.

    V.

    Cheers!
    -Tim
    On Thursday, November 20, 2014 1:35:49 PM UTC-8, Carlos Castillo wrote:

    Not having the stdlib there presents a problem where any links to stdlib
    classes won't exist / work.
    On Thursday, November 20, 2014 1:56:10 AM UTC-8, Dmitri S wrote:

    Another question on godoc - if you want to start a godoc web server that
    would not show the Go standard library packages (for example, as a project
    or company documentation pages), would you set -goroot to some directory
    that does not have anything Go-related? This seems to work but I wonder if
    there is a more elegant way.

    Dmitry
    On Thursday, November 20, 2014 8:21:27 AM UTC+1, Dave Cheney wrote:

    godoc -http=:8080
    On Thursday, 20 November 2014 18:14:02 UTC+11, Tim Heckman wrote:

    Hello,

    Apologies if I'm asking a question that's been answered, or is easy to
    find... I've not found the right documentation yet.

    I'm trying to find the best way to preview the comments of my code as
    it would appear when parsed by godoc. The problem is that I'd like to view
    it when in http server mode, and can't seem to find a way to do that. Is
    this possible?

    I've seen how to dump it in plain text. However, when doing that my
    function-specific Examples don't show up even with "-ex=true".

    Thanks in advance!

    Cheers!
    -TIm
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tim Heckman at Nov 22, 2014 at 3:55 am
    PEBKAC

    I misread the Example function declaration for methods when reading the
    testing package documentation. I didn't declare the Type and Method in the
    proper order.

    Thank you for all the replies.

    Cheers!
    -Tim

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 20, '14 at 7:14a
activeNov 22, '14 at 3:55a
posts9
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase