[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 vS

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 function is call it. Ian

[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 fr

[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): https://github.com/golang/go/compare/go1

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 vSphere management conso

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 y

[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 mes

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

2016-07-21 Thread Uwe Dauernheim
Great progress, thanks! It seems gofmt-on-save is (still) not available. I know of the workarounds like the file change watcher, gofmt-on-commit, and multi-assigned keyboard shortcuts. But could you explain if the problem exists generally because of IntelliJ's auto-save feature or is the gofmt-

[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 ca

[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 1

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 flag > > as an argument (remem

[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 program safe and robust. > W

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 t

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 wrote: > On Thu,

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

2016-07-21 Thread Manlio Perillo
On Thu, Jul 21, 2016 at 8:39 PM, Konstantin Khomoutov wrote: > 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.W

[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 argument (remember CreateFi

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

2016-07-21 Thread Jakob Borg
I would say that syncing file contents is a more advanced operation that stems from some knowledge about the persistence requirements of your application. If you have those requirements you need to be in control and should not use a convenience operations like WriteFile. Also, performance. (I've p

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 from this group and stop re

[go-nuts] ioutil.WriteFile and Sync

2016-07-21 Thread Manlio Perillo
What is the reason why ioutil.WriteFile does not call File.Sync? Thanks Manlio -- 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+unsubscr...@googlegro

[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 la

[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/ (wh

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 sto

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

2016-07-21 Thread Hugh S. Myers
Interface differences are often similar to discussions about calculator styles. Some swear by RPN, others swear at it :) I'd be happy enough with leaving the box up and maybe an hour-glass cursor. Just avoid visual silence as it tends to look like nothing is going on... On Thu, Jul 21, 2016 at 1:4

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 a

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. W

[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 17

[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 acce

[go-nuts] DevOp - Automatization and Proxy Server for Developement

2016-07-21 Thread Henrique santos
Hi all, i like to introduce this project that i am releasing today on github. DevOp lets you to write commands that will be executed on file system events, example, you can define command called gobuild thats call go build . on every modification on files that ends with .go. DevOp acts as a pr

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 license.

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 emai

[go-nuts] serializing a value using Go syntax

2016-07-21 Thread Manlio Perillo
Hi. In a project I need to generate some Go source files containing only variable definitions. These variables are generated by some tools written in Go. Currently I'm generating the variable definitions using the fmt package with the #v flag, but there are several problems: * The generated li

Re: [go-nuts] failed ,creating static binary in 32bit ubuntu

2016-07-21 Thread Konstantin Khomoutov
On Thu, 21 Jul 2016 05:45:41 -0700 (PDT) vijaykumar.g...@vistarait.com wrote: > i am compiling in 32bit ubuntu 12.04LTS > GO Vesrion 1.6.2 (32bit) > > openssl version > OpenSSL 1.0.1 14 Mar 2012 > > i have required library also > /lib/i386-linux-gnu/libcrypto.so.1.0.0 > /usr/lib/i386-linux-gnu

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

2016-07-21 Thread Alfred Hall
No problem. Keep me posted how you get on with it and if there is anything I can help you with. Feedback is very important to us. Cheers. Alf On Thu, Jul 21, 2016 at 12:14 PM, Ali Zaid wrote: > Thanks a lot! I will give it a try, I'm planning a private project, if > it's successful, then I will

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 possible so long as t

[go-nuts] failed ,creating static binary in 32bit ubuntu

2016-07-21 Thread vijaykumar . giri
hello guys i am compiling in 32bit ubuntu 12.04LTS GO Vesrion 1.6.2 (32bit) openssl version OpenSSL 1.0.1 14 Mar 2012 i have required library also /lib/i386-linux-gnu/libcrypto.so.1.0.0 /usr/lib/i386-linux-gnu/libcrypto.a /usr/lib/i386-linux-gnu/libcrypto.so /usr/lib/i386-linux-gnu/pkgconfig/

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

2016-07-21 Thread Ali Zaid
Thanks a lot! I will give it a try, I'm planning a private project, if it's successful, then I will properly open it as a service and get a licence. Regards, Ali Z. Anwar On Wed, Jul 20, 2016 at 1:22 AM, Alfred Hall wrote: > Hi Ali. > > We have just added PDF Clip and Rotate, see the examples o

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 irres

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 solve

[go-nuts] Linux File descriptor question in golang

2016-07-21 Thread Homer Li
Could I get file path from the file descriptor number ? OS : Linux How to write in golang ? Thanks. -- Best Regards Homer Li -- 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

Re: [go-nuts] Re: Go is for everyone

2016-07-21 Thread Nick Sarbicki
> > If go run is the primary starting point you wouldn't need the GOPATH > configured. > > What I think would be interesting is the ability that most scripting > languages provide which is to just start coding. No functions requiring > definition and perhaps an auto-import of fmt, strings, io,

Re: [go-nuts] Re: Go is for everyone

2016-07-21 Thread Nathan Fisher
Hi, If go run is the primary starting point you wouldn't need the GOPATH configured. What I think would be interesting is the ability that most scripting languages provide which is to just start coding. No functions requiring definition and perhaps an auto-import of fmt, strings, io, etc. So you

[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 crea

Re: [go-nuts] String Split Question

2016-07-21 Thread roger peppe
I'd do something like this: https://play.golang.org/p/w4b4z0tVQ8 but it really depends on the details of the encoding and how robust you want to be with malformed records. For example, should "[foo[bar]baz]" be treated as ["foo[bar]baz"], ["foo[bar"], ["foo[bar", "baz"] or as an error ? On 21 Jul

[go-nuts] Re: Go is for everyone

2016-07-21 Thread Egon
On Thursday, 21 July 2016 10:43:06 UTC+3, Ralf Schülke wrote: > > 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

[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, t