[go-nuts] warning: "std" matched no packages (hello world works)

2017-11-10 Thread rorschach . rev
Platform is x86_64 kernel 4.4.0 Ubuntu flavored Linux Mint. I had the golang package installed but it was too old to run newer code. Removed package and proceeded with install. Downloaded static version of go 1.9.2 (104247844 bytes) from website, moved folder into /usr/local/go. gopath is set. a

[go-nuts] Re: Zip file created by archive/zip can't be opened on Windows machine

2017-11-10 Thread Donovan
its not totally clear the exact issue you're dealing with - a minimal example would go a long way. If I had to guess, I would say your zip entries are using characters not supported by windows file systems. windows has more reserved characters than you might expect, and even reserved filenames

[go-nuts] Re: NaN as key in map

2017-11-10 Thread 'Bryan Mills' via golang-nuts
On Friday, November 10, 2017 at 5:24:25 PM UTC-5, Stefan Nilsson wrote: > > NaN is not equal to NaN. This means that if you use NaN as a key in a > map[float64]string you will not be able to retrieve it again: > https://play.golang.org/p/A7KGgoM3o6 > I guess this is the way it should be, but it's

[go-nuts] NaN as key in map

2017-11-10 Thread Dave Cheney
You could iterate over the map with range and retrieve the key and values -- 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...@googlegroups.com

Re: [go-nuts] NaN as key in map

2017-11-10 Thread Jan Mercl
On Fri, Nov 10, 2017 at 11:24 PM Stefan Nilsson < trolleriprofess...@gmail.com> wrote: > What's your thoughts on this? Not mine, but recommended reading: https://research.swtch.com/randhash -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] NaN as key in map

2017-11-10 Thread Stefan Nilsson
NaN is not equal to NaN. This means that if you use NaN as a key in a map[float64]string you will not be able to retrieve it again: https://play.golang.org/p/A7KGgoM3o6 I guess this is the way it should be, but it's still a little bit disconcerting. What's your thoughts on this? -- You receive

[go-nuts] Zip file created by archive/zip can't be opened on Windows machine

2017-11-10 Thread Jimmy 99
Is anyone familiar with the archive/zip package? I am experiencing the following problem: When I create the Zip file on Ubuntu the file can be extracted no problem. When I try and extract the zip file on a windows machine I get an error saying the file cannot be created. I have tried compiling t

[go-nuts] Re: import paths - slash vs backslash

2017-11-10 Thread Dave Cheney
That's a good question. The contents of the import declaration are defined to be implementation dependent by the spec > The interpretation of the ImportPath is implementation-dependent but it is typically a substring of the full file name of the compiled package and may be relative to a reposi

Re: [go-nuts] Re: try to avoid additional memory allocations

2017-11-10 Thread krolaw
You could avoid allocations altogether by reusing the same byte array and passing it to the function. To retain readability, use a buffer and fmt.Fprintf On Saturday, 11 November 2017 04:00:48 UTC+13, Vasiliy Tolstov wrote: > > Thanks, i know that optimization can lead obscurity, but for critica

Re: [go-nuts] Golang performance benchmarks on arm64 (Qualcomm Centriq 2400)

2017-11-10 Thread Jonathan Yu
On Thu, Nov 9, 2017 at 6:37 AM, Gerald Henriksen wrote: > On Wed, 8 Nov 2017 13:57:03 -0800 (PST), you wrote: > > >"Go support for aarch64 is quite disappointing. > > >Qualcomm and other ARMv8 > >vendors intends to put significant engineering resources to amend this > >situation, but really any o

[go-nuts] import paths - slash vs backslash

2017-11-10 Thread 'Tim Hockin' via golang-nuts
Is it valid to say `import "github.com\foo\bar" (windows path separators) or must it be "github.com/foo/bar"? I couldn't find a canonical answer to this. Thanks Tim -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] [ann] fsq 1.7.1 released

2017-11-10 Thread robert . upcraft
I'm happy to announce a new release of fsq. *What is fsq?* fsq is a BSD-licensed command line tool for querying the file system with a SQL-like language. It attempts to optimize for efficient I/O when possible, but most of all, strives to to make it easy to write readable file system search

Re: [go-nuts] Re: try to avoid additional memory allocations

2017-11-10 Thread Vasiliy Tolstov
Thanks, i know that optimization can lead obscurity, but for critical paths i think that it useful =) 2017-11-10 8:41 GMT+03:00 peterGo : > Vasiliy, > > For portability, when you initialize cfg.WorkDir, clean it: cfg.WorkDir = > filepath.Clean(cfg.WorkDir) > > You can reduce the allocations from 5

Re: [go-nuts] Re: try to avoid additional memory allocations

2017-11-10 Thread Vasiliy Tolstov
Thanks! 2017-11-10 3:52 GMT+03:00 krolaw : > func oid2filepath(cfg *Config, oID uint64) string { >return fmt.Sprintf("%s%c%x%c%016x", cfg.WorkDir, filepath.Seperator, > oid2vid(oID), filepath.Seperator, oID) > } > > On Friday, 10 November 2017 09:58:03 UTC+13, Vasiliy Tolstov wrote: >> >> Hi.

Re: [go-nuts] What are Parse Html token methods for email templates in golang?

2017-11-10 Thread Marvin Renich
* Josh Kamau [171110 03:47]: > You can use 'with' to achieve what you want. > Take a look at this example > > https://play.golang.org/p/incDGEmUJK > > On Wed, Nov 8, 2017 at 12:03 PM, wrote: > > I could not found such token system in golang or any library supporting > > such format. Can anyone

Re: [go-nuts] network programming about go

2017-11-10 Thread 2891132love
I try to change the IP address and close the software related,but it sometimes still can't run sucessfully.Sometimes it can run parts of the result I hope to see.It shows that the client can connect with the server but the server can't connect the client and get the message. 在 2017年11月7日星期二 UTC

[go-nuts] Re: Scaleway

2017-11-10 Thread tactician
Hi Rene, Many thanks for your response. First part works, i.e. looks like I downloaded Go. Second part am struggling with is to engage in Go . not sure how to set the parameters, path etc. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To uns

[go-nuts] Re: Scaleway

2017-11-10 Thread Rene Kaufmann
If you need the newest go release: https://golang.org/doc/install # download the archive wget https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-amd64.tar.gz # extract it to /usr/local sudo tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz # add /usr/local/go/bin to your path echo 'export PATH

[go-nuts] Re: Scaleway

2017-11-10 Thread tactician
> > Thank you Mauricio. > Two points - I do NOT wish to use docker - this would be counter performant I do not understand your reply. I have bash, and cannot download http. It seems setting up relies on prior knowledge of linux code, which I do not possess. I need a set up Go

[go-nuts] Re: Update Mongodb fields with omitempty flag in Golang structure

2017-11-10 Thread Amandeep Kaur
Thanks @Diego Medina It worked for me. On Thursday, November 9, 2017 at 12:19:14 AM UTC+5:30, Diego Medina wrote: > > replied on the mgo list > > https://groups.google.com/d/topic/mgo-users/F3LbWdyPGDc/discussion > > (pasted here to save a click) > > Hi, > > > the checkbox is unchecked and form

Re: [go-nuts] What are Parse Html token methods for email templates in golang?

2017-11-10 Thread Josh Kamau
You can use 'with' to achieve what you want. Take a look at this example https://play.golang.org/p/incDGEmUJK I have to say your question is not clear and i just guessed what you want. Thanks. Josh On Wed, Nov 8, 2017 at 12:03 PM, wrote: > Hi everyone, > > I am trying to create email templa

[go-nuts] Go predicts the end of the universe

2017-11-10 Thread Hal
Go predicts the end of the time, i.e. the end of the universe 😂 https://play.golang.org/p/THHvbdo_IS package main import ( "fmt" "math" "time" ) func main() { endOfTheTime := time.Unix(math.MaxInt64,81394542089).UTC() fmt.Println(endOfTheTime.String()) } Hal -- You received th