Re: [go-nuts] tool to automatically refresh godoc ?

2018-12-21 Thread Dan Kortschak
And yes. The curl option is -d, not -F, so  curl -X POST -d "path=${IMPORTPATH}" https://godoc.org/-/refresh works and could easily be made into a post-push hook to be run in the root of the package like so: for pkg in $(go list ./...); do curl -X POST -d "path=${pkg}"

[go-nuts] Previewing Go Docs with Modules

2018-12-21 Thread matthew . ouille
Hey all, I've been using modules for quite some time now. One of the hangups I have is previewing what my godocs will look like. Does anyone know of a way that I can do this, or if I can get godoc to let me view my packages that are module aware? Thanks! -- You received this message because

Re: [go-nuts] if/switch statements as expressions

2018-12-21 Thread Jamie Clarkson
It seems to me that what he was railing against was the design-by-committee approach? Having never studied Algol68 it's hard to say but skimming the wiki page parts of it could be transposed directly into one about Go so I'm not sure the DNA is totally gone, just we're lucky to avoid the

Re: [go-nuts] tool to automatically refresh godoc ?

2018-12-21 Thread Dan Kortschak
A quick read of the gddo source suggests that this should work (but presumably because I have missed something, it doesn't) curl -X POST -F "path=${IMPORTPATH}" https://godoc.org/-/refresh On Thu, 2018-12-20 at 09:55 +0100, Sebastien Binet wrote: > hi there, > > in all my Go-based projects I

Re: [go-nuts] tool to automatically refresh godoc ?

2018-12-21 Thread Sam Whited
On Fri, Dec 21, 2018, at 14:48, Beoran wrote: > Not go specific, there are inotifywait and entr > http://eradman.com/entrproject/. Or a post-push hook on the server where the repos live if you're using Git. —Sam -- You received this message because you are subscribed to the Google Groups

[go-nuts] tool to automatically refresh godoc ?

2018-12-21 Thread Beoran
Not go specific, there are inotifywait and entr http://eradman.com/entrproject/. In go you would need something like this: https://github.com/fsnotify/fsnotify -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Re: tool to automatically refresh godoc ?

2018-12-21 Thread ajp
This seems like a 20 minute job in bash, to be honest, but maybe somebody has written a comprehensive tool. On Thursday, December 20, 2018 at 3:56:11 AM UTC-5, Sebastien Binet wrote: > > hi there, > > in all my Go-based projects I have a bunch of CI/CD tools that keep me > honest about APIs,

Re: [go-nuts] Re: if/switch statements as expressions

2018-12-21 Thread Mark Volkmann
I would sure like to see something like that! On Fri, Dec 21, 2018 at 12:06 PM alanfo wrote: > Some languages which don't support the conditional operator or if/else > expressions have an Iif function (or similar) instead. > > If generics are added to Go, it might be worth including something

[go-nuts] Re: if/switch statements as expressions

2018-12-21 Thread alanfo
Some languages which don't support the conditional operator or if/else expressions have an Iif function (or similar) instead. If generics are added to Go, it might be worth including something like this in the standard library to cut down on boilerplate for simple cases: // in a package called

Re: [go-nuts] if/switch statements as expressions

2018-12-21 Thread Michael Jones
It is always good to be reading Dijkstra. He was a treasure. His observations were those of the computing world, and combined with IBM’s dominance and desire behind PL/1, created the dead zone from which C saved us all. Unfortunately the good of these dead ends was lost, and the good of Algol68

[go-nuts] Re: Q on using reflect: how to distinguish methods from functions?

2018-12-21 Thread Jason E. Aten
Hi Max, gomacro is of course a beautiful work, and I encourage it. Thank you for gomacro. It is quite alot of work to build these interpreters, but they can be so valuable. The issue I was having stems from the layers of Gijit being independent--having been reused from other projects like

[go-nuts] Re: Q on using reflect: how to distinguish methods from functions?

2018-12-21 Thread Max
Hello Jason, do you have the time to explain this problem more in detail? My Go interpreter gomacro (I think you already met it), solves the problem of invoking `b.After(a)` as follows at "compile time", i.e. during typecheck and translation: 1. detects that `b` is a `time.Time`. 2. looks up

Re: [go-nuts] if/switch statements as expressions

2018-12-21 Thread Jamie Clarkson
Happened to be randomly rereading through the EWD archives and came upon this simultaneously with reading this thread: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD02xx/EWD230.html (no comment!) Jamie On Friday, December 21, 2018 at 7:57:07 AM UTC, Tom Mitchell wrote: > > > On Thu,

Re: [go-nuts] Go Documentation

2018-12-21 Thread hb
Thanks, that helps me a lot. On Friday, December 21, 2018 at 11:33:40 AM UTC+8, Tom Limoncelli wrote: > > > > On Thu, Dec 20, 2018 at 1:27 AM 伊藤和也 > > wrote: > >> Are there any teaching materials to learn how to write go documentations? >> > > Are you looking for documents that can be used to