[go-nuts] Re: Controlling VMware ESXi from Go

2016-07-21 Thread S . Çağlar Onur
Hey Brad, [just summarizing our twitter conversation here for reference] On Thursday, July 21, 2016 at 5:11:59 PM UTC-7, bradfitz wrote: > > If you have experience controlling VMware ESXi nodes from Go, could you > point me at recommended packages? Or API reference? > > Note: no vCenter, no

Re: [go-nuts] getting the receiver from a bound method

2016-07-21 Thread Ian Lance Taylor
On Thu, Jul 21, 2016 at 8:52 PM, Alex Flint wrote: > Is it possible to use reflection to retrieve the value of x from > reflect.ValueOf(x.SomeMethod) where x is an instance of some struct type? No. Approximately the only thing you can do with a reflect.Value that is a

[go-nuts] getting the receiver from a bound method

2016-07-21 Thread Alex Flint
Is it possible to use reflection to retrieve the value of x from reflect.ValueOf(x.SomeMethod) where x is an instance of some struct type? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Re: Go 1.7 Release Candidate 3 is released

2016-07-21 Thread Chris Broadfoot
A couple people requested a changelog between release candidates. I'll try to remember to include that for the 1.8 release candidates (we don't plan to do a 1.7rc4). GitHub has a nice view for commits between refs. Here's what was in 1.7rc2 (very small):

Re: [go-nuts] Controlling VMware ESXi from Go

2016-07-21 Thread James
Take a look at govmomi -- works well with individual ESXi nodes. On Thu, Jul 21, 2016 at 20:11 Brad Fitzpatrick wrote: > If you have experience controlling VMware ESXi nodes from Go, could you > point me at recommended packages? Or API reference? > > Note: no vCenter, no

Re: [go-nuts] Controlling VMware ESXi from Go

2016-07-21 Thread Tim Hawkins
Do they have an OpenStack wrapper for ESXi? If they do that is probaly an easier target to be looking at# http://docs.openstack.org/kilo/config-reference/content/vmware.html It does seem to exist for vSphere. https://github.com/openstack/golang-client Openstack golang client. Upside is that

[go-nuts] Controlling VMware ESXi from Go

2016-07-21 Thread Brad Fitzpatrick
If you have experience controlling VMware ESXi nodes from Go, could you point me at recommended packages? Or API reference? Note: no vCenter, no vSphere management console, no Windows. Only Linux (or OS X), and only the basic level of ESXi. I'm new to all this. Thanks! -- You received this

[go-nuts] Go 1.7 Release Candidate 3 is released

2016-07-21 Thread Chris Broadfoot
Hello gophers, We have just released go1.7rc3, a release candidate for Go 1.7. It is cut from release-branch.go1.7 at the revision tagged go1.7rc3. Please help us by testing your Go programs with the release, and report any problems using the issue tracker: https://golang.org/issue/new You

[go-nuts] Re: Calling go functions from command line

2016-07-21 Thread carlfnienaber
You can add the functions to a map and use the string representation passed in from the command line to execute them var funcs map[string]func() func add(){ ... get parameters from command line } func main(){ func, ok := funcs[funcName] ... test ok func() } On Thursday, 21 July 2016

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Konstantin Khomoutov
On Thu, 21 Jul 2016 21:17:38 +0200 Manlio Perillo wrote: > >> What is the reason why ioutil.WriteFile does not call File.Sync? > > > > I'd say that's because to inhibit this behaviour when needed you'd > > need to implement ioutil.WriteFileNoSync() or have an option

[go-nuts] Re: Calling go functions from command line

2016-07-21 Thread Rick
See os.Exec. Also there is a nice project https://github.com/codeskyblue/go-sh that friendly's the stdlib up. On Thursday, 21 July 2016 12:14:04 UTC-7, christ...@google.com wrote: > > Cgo enables us to call C functions from Go programs, and we can run C > functions from command line. > > Are we

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Sam Whited
On Thu, Jul 21, 2016 at 2:17 PM, Manlio Perillo wrote: > On Thu, Jul 21, 2016 at 8:39 PM, Konstantin Khomoutov > I'm curious to know why one wants to inhibit the durability behaviour. > AFAIK, several design choices of Go and its standard library are > designed to make

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Manlio Perillo
Il giorno giovedì 21 luglio 2016 21:28:09 UTC+2, Axel Wagner ha scritto: > > There are almost no use cases that require syncing the file. The operating > system is designed with a good buffering layer for a reason. If you do have > such need, it is trivial to write your own version of WriteFile

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread 'Axel Wagner' via golang-nuts
There are almost no use cases that require syncing the file. The operating system is designed with a good buffering layer for a reason. If you do have such need, it is trivial to write your own version of WriteFile that does this. On Thu, Jul 21, 2016 at 9:17 PM, Manlio Perillo

[go-nuts] Calling go functions from command line

2016-07-21 Thread christhompson via golang-nuts
Cgo enables us to call C functions from Go programs, and we can run C functions from command line. Are we able to call Go functions directly from command line? For example if I have a function in Go: func add(a, b int) int { return a + b } Can I somehow invoke this from bash? Thanks! --

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Konstantin Khomoutov
On Thu, 21 Jul 2016 11:17:18 -0700 (PDT) Manlio Perillo wrote: > What is the reason why ioutil.WriteFile does not call File.Sync? I'd say that's because to inhibit this behaviour when needed you'd need to implement ioutil.WriteFileNoSync() or have an option flag as an

Re: [go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Jan Mercl
On Thu, Jul 21, 2016 at 8:17 PM Manlio Perillo wrote: > What is the reason why ioutil.WriteFile does not call File.Sync? That would be harmful. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Go plugin for IntelliJ update with support for 2016.2 IDEs and a lot more

2016-07-21 Thread Florin Pățan
Hi all, The Go plugin for IntelliJ (and all the other JetBrains IDEs + Android Studio) has just received a new update. Among the the most important things the plugin adds are: - a lot of new inspections and quickfixes - completion improvements - improved overall performance - support for the

[go-nuts] Re: What dependency management tool do you use?

2016-07-21 Thread Jeremy Echols
I hesitate to respond with all the emotions flying high, but I love gb. Its philosophy seems to match my own very well, pulls dependencies nicely with the built-in vendor plugin, doesn't force vendoring, allows caching semver projects externally by version number, lets my code live in src/

Re: [go-nuts] Why can't I access port 6060 (pprof) in remote host

2016-07-21 Thread Shawn Milochik
Because of this: http.ListenAndServe("localhost:6060", nil) You're only listening on localhost. Just use :6060 or 0.0.0.0:60 or your actual public-facing IP. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] Pure Golang Online Mandelbrot Viewer and MORE

2016-07-21 Thread pragmaticwiz
Drawing a box is exactly how earlier versions worked. I did this, first, because other renderers did the same. I found drawing a box was not intuitive at all. People just could not figure it out. The reason is that there is no conceptual mapping unless you have already seen that behaviour in

Re: [go-nuts] Pure Golang Online Mandelbrot Viewer and MORE

2016-07-21 Thread John Morrice
hsmyers: as a pioneer I really appreciate your input! I was planning to run godelbrot on my Pi, so I will definitely check out your venerable FracZoom program for RISC. *However, *drawing an outline box is exactly what earlier versions did. I found that people just couldn't figure it out.

[go-nuts] Why can't I access port 6060 (pprof) in remote host

2016-07-21 Thread Yongxiu Wu
I am using net/http/pprof to monitor my program. I import the package _"net/http/pprof" ,and add some code snippets as follow *...* func main(){ debug() *...* } func debug(){ go func(){ http.ListenAndServe("localhost:6060", nil) }() } After that, I can access it in my localhost (ip is

[go-nuts] Godoc templates custom functions

2016-07-21 Thread matteo . suppo
Ok so I wanted some nice markdown docs for my repos. https://github.com/robertkrimen/godocdown is not being updated in 3 years and it has some issues. I decided to try with vanilla godoc and templates. Unfortunately it messes up with whitespace. Do you know if there's a way to make godoc

Re: [go-nuts] Re: [ANN] UniDoc PDF Toolkit for golang

2016-07-21 Thread Todd Neal
On Wednesday, July 20, 2016 at 6:19:44 PM UTC-5, kristian wrote: > > I agree with this. Go needs a pdf library that is apache, mit or > bsd licensed. > Have you seen github.com/jung-kurt/gofpdf? I think the API is a bit wonky as it's derived from FPDF, but it works and uses the MIT

Re: [go-nuts] serializing a value using Go syntax

2016-07-21 Thread Peter Waller
The closest thing I'm aware of is . Not sure if it solves your use case, but might get you some of the way there. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Linux File descriptor question in golang

2016-07-21 Thread Peter Waller
On 21 July 2016 at 12:37, Alex Bligh wrote: > > On Linux (and indeed most if not all POSIX like systems) > one cannot get a file path from the file descriptor number. > This is irrespective of programming language used. While your statement is true generally, it is actually

Re: [go-nuts] Linux File descriptor question in golang

2016-07-21 Thread Alex Bligh
> On 21 Jul 2016, at 11:02, Homer Li <01jay...@gmail.com> wrote: > > Could I get file path from the file descriptor number ? > OS : Linux > How to write in golang ? On Linux (and indeed most if not all POSIX like systems) one cannot get a file path from the file descriptor number. This is

Re: [go-nuts] Linux File descriptor question in golang

2016-07-21 Thread Konstantin Khomoutov
On Thu, 21 Jul 2016 18:02:53 +0800 Homer Li <01jay...@gmail.com> wrote: > Could I get file path from the file descriptor number ? > OS : Linux > How to write in golang ? I'm afraid, you can't. But as usually in such cases, I have an imminent question: what initial problem are you trying to

[go-nuts] Re: What dependency management tool do you use?

2016-07-21 Thread mhhcbon
I will only put some lights on my experience. *Gopath ect* Except at the very beginning of my experience with Go, i don't think anymore about my GOPATH. I had setup a go work space as defined by the go core team, and declared gopath appropriately. Since then, every cli project or library, I

[go-nuts] Re: Go is for everyone

2016-07-21 Thread Ralf Schülke
Hi, Programming language is secondary level. first must be clear as works as a Computer (machine) production. In my early time, which was very clear but hard 8bit machines could one still imagine today the machine are a thousand times faster and their possibilities as well. Alone GPU, I / O,