Re: [go-nuts] Multiple-reader single-writer map access is safe ?

2016-11-07 Thread Asit Dhal
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

Re: [go-nuts] Golang smtp package support for CC and BCC

2016-09-29 Thread asit dhal
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

[go-nuts] Golang smtp package support for CC and BCC

2016-09-26 Thread Asit Dhal
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

Re: [go-nuts] Re: Handling multiple things happening at the same time

2016-09-10 Thread Asit Dhal
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

Re: [go-nuts] difference between template.Execute and template.ExecuteTemplate()

2016-09-09 Thread Asit Dhal
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

Re: [go-nuts] reasonable or not?

2016-09-07 Thread Asit Dhal
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

Re: [go-nuts] Handling multiple things happening at the same time

2016-09-07 Thread Asit Dhal
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

[go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-08-29 Thread Asit Dhal
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

Re: [go-nuts] Re: totalling a column in a html template.

2016-08-26 Thread Asit Dhal
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

[go-nuts] defer at struct level

2016-08-21 Thread asit dhal
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

Re: [go-nuts] Re: import csv file

2016-08-19 Thread asit dhal
+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

Re: [go-nuts] Remove vs Delete

2016-08-19 Thread asit dhal
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

Re: [go-nuts] Re: Database design pattern

2016-08-19 Thread asit dhal
, 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

Re: [go-nuts] Weired or not?

2016-08-19 Thread asit dhal
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 { } >

[go-nuts] Database design pattern

2016-08-19 Thread asit dhal
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

Re: [go-nuts] How to initialize two dimension array

2016-08-19 Thread asit dhal
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

[go-nuts] Re: import csv file

2016-08-18 Thread Asit Dhal
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

Re: [go-nuts] import csv file

2016-08-18 Thread asit dhal
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

Re: [go-nuts] [ANN] CribbNotes CUI

2016-08-04 Thread Asit Dhal
. 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

Re: [go-nuts] Re: IDE for GOLANG

2016-08-02 Thread Asit Dhal
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