Thanks, for our case, it will be easy enough to just change : for . and
move on from there.
Thanks
On Monday, October 30, 2017 at 4:55:03 PM UTC-4, Rob 'Commander' Pike wrote:
>
> Or you could change the : to a . and use time.Parse.
>
> -rob
>
>
> On Tue, Oct 31, 2017 at 4:47 AM, Jim Cote
> > w
On Tue, Oct 31, 2017 at 2:25 AM, wrote:
> I found this a little bit non sequitur - if I want to call interface
> function I have a perfect business to check if underlying object is not nil
> before call just to avoid panic on call. Besides underlying nil in interface
> may be used to signal condi
Or you could change the : to a . and use time.Parse.
-rob
On Tue, Oct 31, 2017 at 4:47 AM, Jim Cote wrote:
> See https://golang.org/src/time/format.go?s=23626:23672#L249. The
> standard library is explicitly looking for the period. Your easiest
> solution would be to just write your own pars
chi includes a middleware for this, see:
https://github.com/go-chi/chi/blob/master/middleware/throttle.go and some
examples here:
https://github.com/go-chi/chi/blob/master/_examples/limits/main.go
I haven't used it myself, but it seems to support having a fixed backlog as
well, which is important
The short version is the former was written before the Go compiler was
ported to Go.
The longer story is laid out in this presentation from
2014. https://www.youtube.com/watch?v=QIE5nV5fDwA
On Tuesday, 31 October 2017 04:30:06 UTC+11, Abyx wrote:
>
> Golang has two parsers. go/* for "go fmt", a
On Mon, Oct 30, 2017 at 6:29 PM wrote:
> I noticed a very strange effect by translating the
> mutual exclusion algorithm of E. W. Dijkstra to Go.
For every combination of lines A/B present/not present, the program has
data races, so there's nothing to reason about.
You can try it by yourself by
See https://golang.org/src/time/format.go?s=23626:23672#L249. The standard
library is explicitly looking for the period. Your easiest solution would
be to just write your own parser.
On Monday, October 30, 2017 at 11:20:51 AM UTC-4, Diego Medina wrote:
>
> Hi,
>
> I need to parse datetime data
I think it's the non-preemptive scheduler that hits you.
Afaik it is a known behavior that I am not sure how to fix.
I did not at all look at the solution itself.
mån 30 okt. 2017 kl 18:29 skrev :
> Dear Go-community,
>
> I noticed a very strange effect by translating the
> mutual exclusion algor
Dear Go-community,
I noticed a very strange effect by translating the
mutual exclusion algorithm of E. W. Dijkstra to Go.
Reference:
Cooperating Sequential Processes. Technical Report EWD-123,
Technological University Eindhoven (1965)
http://www.cs.utexas.edu/users/EWD/ewd01xx/EWD123.PDF)
I
I found this a little bit non sequitur - if I want to call interface
function I have a perfect business to check if underlying object is not nil
before call just to avoid panic on call. Besides underlying nil in
interface may be used to signal condition for variety of types implementing
this in
On Sun, Oct 29, 2017 at 11:40:36PM -0700, hui zhang wrote:
> type variastrt struct {
> len int32
> data []int32 // data length = len [len]int32
> }
>
> Is there a way or lib to read a binary into a this structure in one line
> code?
>
> how about more complicate struct ?
> type complicatest
Hi,
I need to parse datetime data given in a csv file, the format I get (I get
a lot of diff ones but the latest is):
20060102 15:04:05:000
but if I use that with time.Parse, it doesn't parse the millisecond part,
tells me:
parsing time "20170628 12:11:00:103" as "20060102 15:04:05:000": cann
Hello Vladimir, first you must check errors returned by all calls of Receive
and Send. Better break the loop if error is not nil.
--
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, s
Something like this is a bit simpler, avoids the need for unsafe, and
may be a little faster too:
https://play.golang.org/p/4jayHwLroR
It may be quicker to use a type switch: https://play.golang.org/p/4uu2XeVM9m
It's a pity that about the need for a dynamic type conversion on every
field, but the
Thanks!
Seems to be the best solution. I just wanted to check what should be done;
in such situations which that extra signaling about closing channel is
undesirable.
Actually since there is a timeout element too, here a method is used (func
(p *Payload) WaitResult(timeout ...time.Duration) (*
Go it working..
MAC installed "go 1.9" executable in /usr/local/bin which was overriding
the /usr/local/go/bin "go" executable
Removed it and things works fine now
Thanks
On Monday, October 30, 2017 at 4:24:22 PM UTC+5:30, Abhijit Desai wrote:
>
> Thanks for the help Dave
>
> Let me check
>
still no luck... not sure where this coming from
go version
go version go1.9.2 darwin/amd64
On Monday, October 30, 2017 at 4:14:27 PM UTC+5:30, Dave Cheney wrote:
>
> Please unset GOROOT, that is the root of the problems with your
> installation. Then follow the instructions above.
--
You
Thanks for the help Dave
Let me check
Rgds
Abhi
On Monday, October 30, 2017 at 4:14:27 PM UTC+5:30, Dave Cheney wrote:
>
> Please unset GOROOT, that is the root of the problems with your
> installation. Then follow the instructions above.
--
You received this message because you are subscri
That's not true. I frequently build, as below, a single executable from a
choice of a few in the same directory. Works a treat.
Lucio.
On Monday, 30 October 2017 11:13:52 UTC+2, Volker Dobler wrote:
>
> $ go build a.go
>>
>
> go build works on packages (or paths, not on files).
>
> V.
>
>
>
--
Please unset GOROOT, that is the root of the problems with your installation.
Then follow the instructions above.
--
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
$ which go
/usr/local/bin/go
$ sudo vi $HOME/.profile
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export PATH="$HOME/.cargo/bin:$PATH"
On Monday, October 30, 2017 at 3:51:30 PM UTC+5:30, Dave Cheney wrote:
>
> Do you have GOROOT set? I set i
Do you have GOROOT set? I set it
What does ‘which go’ return?
--
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.
For more
Deleted usr/local/go and copied/extracted go1.7.4.darwin-amd64.tar.gz
usr/local/go/VERSION file shows go1.7.4
but go version still showing version 1.9.2
Don't know where it's coming from
Any idea?
go version
go version go1.9.2 darwin/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOS
It looks like your using OS X, which doesn’t ship with any version of Go that I
know of. Nevertheless the uninstall operation is simple, just delete
/usr/local/go and follow the installation instructions on the website.
--
You received this message because you are subscribed to the Google Group
Updated OS os... so I think it's auto installed 1.9 version over 1.7
How to remove it? or any solution?
Please help
Thanks,
Abhi
On Monday, October 30, 2017 at 2:37:45 PM UTC+5:30, Dave Cheney wrote:
>
> Errors like these are usually caused by either having multiple versions of
> Go installed
>
> $ go build a.go
>
go build works on packages (or paths, not on files).
V.
--
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...@googlegr
I think you should use a channel. If the communication is between two parities
then there is no need to close the channel after sending the result as the are
not other parties to inform that they missed the message.
--
You received this message because you are subscribed to the Google Groups
Errors like these are usually caused by either having multiple versions of Go
installed on your system, or overwriting one version of Go with another.
how did you upgrade Go on this machine? How was the previous version installed?
--
You received this message because you are subscribed to the G
Mac is upgraded to 1.9.2 version and suddenly not able to build the simple
program
package main
import (
"fmt"
)
func main() {
fmt.Printf("TEST")
}
Please help
$ go build a.go
# command-line-arguments
flag provided but not defined: -goversion
usage: compile [options]
Hi
There are several ways to solve it, here are two of them:
https://play.golang.org/p/wJwkI7HQwv
https://play.golang.org/p/nasUcgBeG4
I prefer the first one, because so I can decide if i want to wait for the
end of twoprint or not.
Cheers
Am Montag, 30. Oktober 2017 06:43:45 UTC+1 schrieb 28
BTW currently a private channel with length of 1 is being used and the
other side must call a function to get the result (with a timeout). This
way the second signal about closing the channel is not a problem. And we
see this inside the standard library too, like in the time channel of a
time.T
Problem: After the completion of some task, the task issuer should be
informed about the completion/failure of the task - like by using some
struct { Result Result, Err error }.
Question: Which mechanism is preferred: using channels or callbacks?
Why the question: IMHO channels are the answer b
> it would be great to move to pcg.
Why? PCG isn't faster, isn't simpler and isn't better (though not worse either).
--
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
33 matches
Mail list logo