Hi, the second one is better.
The lock should only protect the shared data. In this case, gMap.
In the first case, you are protecting some computations which are not accessing
any shared data.
On November 7, 2016, at 4:03 AM, 刘桂祥 wrote:
should I use ??
mu.Lock()
temp := make(m
I understood.
Thanks
On Mon, Sep 26, 2016 at 5:54 PM, Konstantin Khomoutov <
flatw...@users.sourceforge.net> wrote:
> On Mon, 26 Sep 2016 14:49:57 +
> "Manuel Amador (Rudd-O)" wrote:
>
> > > I don't see any functions in Golang net/smtp package for CC and
> > > BCC. Does it support those func
Hi,
I don't see any functions in Golang net/smtp package for CC and BCC.
Does it support those functionalities ?
If not, is there any work around for that ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop
from it, send
an email to golang-nuts+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards,
Asit Dhal
http://asit-dhal.github.io/
--
You received this message because you are subscribed to the G
s+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards,
Asit Dhal
http://asit-dhal.github.io/
--
You received this message because you are subscribed to the Google Groups
"golang-nuts&q
e 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
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
War
quot;golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-nuts+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards,
A
Hi,
Go1.7 is faster in most benchmarks, but still slower than Java in some
benchmarks(like Go 1.6).
GO Garbage Collector needs time to become mature like JVM.
K-nucleotide, binary tree, Regex-dna are bad for GO(lack of fast GC and
good standard libraries).
But, for me, Go is an awesome substi
Hi,
If you really need to calculate total, you should leave that completely to
the view layer(client side java script).
On Fri, Aug 26, 2016 at 8:55 AM, Simon Ritchie
wrote:
> If you follow the Model View Controller (MVC) model, you should do all of
> the clever stuff in your controller and jus
Hi all,
I use defer to release resource at function level.
func test() {
a := A.Open()
defer a.Close()
//other code
}
I need the object a, to be wrapped in a struct. Can someone tell me how to make
a.Close() in this case elegantly ?
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
--
You
+1
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/20/2016 2:14:47 AM, Shawn Milochik wrote:
To everyone participating in this thread: Google "help vampire"
To OP: don't be one.
To everyone else: Don't feed them.
--
You received this message because you are subscribed
completely. delete changes the
attributes of the container.
These concepts are well implemented in STL.
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/20/2016 12:51:52 AM, bep wrote:
I had this discussion with another Gopher about the difference between Delete
and Remove.
I found this
, thanks for the Martin Fowler link.
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/19/2016 7:06:06 PM, paraiso.m...@gmail.com wrote:
I find your question strange because, unless you have a specific architectural
problem , which you don't, AFAIK, you shouldn't try to force patter
After struct embedding of S1 in S2, all methods of S1 will be available in S2.
So, this is ok !!
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/19/2016 5:13:09 PM, Ian Lance Taylor wrote:
On Thu, Aug 18, 2016 at 10:16 PM, T L wrote:
>
> package main
>
> type S1 struct { }
>
application design pattern(a tutorial or github
repo) for small database access ?
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails fro
Here is a link to initialize a static array
http://www.dotnetperls.com/2d-go
And at runtime,
https://rosettacode.org/wiki/Create_a_two-dimensional_array_at_runtime#Go
Warm Regards,
Asit Dhal
http://bit.ly/193ASIT
On 8/18/2016 6:19:57 PM, Seb Binet wrote:
On Thu, Aug 18, 2016 at 9:32 AM
There is a csv package in golang
https://golang.org/pkg/encoding/csv/
There is a sql package in golang too
https://golang.org/pkg/database/sql/
For sqlite
https://godoc.org/github.com/gwenn/gosqlite
You need to use csv parser and insert into sqlite database.
Warm Regards,
Asit
http://bit.ly/19
There is a csv package in golang
https://golang.org/pkg/encoding/csv/
There is a sql package in golang too
https://golang.org/pkg/database/sql/
For sqlite
https://godoc.org/github.com/gwenn/gosqlite
You need to use csv parser and insert into sqlite database.
Warm Regards,
Asit
http://bit.ly/19
.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-nuts+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards,
Asit Dhal
http://asit-dhal.github.i
ubscribe from this group and stop receiving emails from it, send
an email to golang-nuts+unsubscr...@googlegroups.com
<mailto:golang-nuts+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
Warm Regards,
Asit Dhal
http://asit-dhal.github.io/
--
Yo
20 matches
Mail list logo