[go-nuts] question about net Buffers.WriteTo method

2025-01-15 Thread Jamil Djadala
all buffers in 1 buffer (yes, allocate memory), and write this one with Write. Does i miss something ? Is current implementation are correct ? -- Jamil Djadala -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Is this a bug ?

2021-06-03 Thread Jamil Djadala
https://groups.google.com/g/golang-nuts package main import ( "fmt" ) func main() { const aa int = 0 var a int fmt.Println(float64(1

Re: [go-nuts] I think I found a bug?

2021-05-26 Thread Jamil Djadala
minimally changed code that works: https://play.golang.org/p/Tcfw_EC8jMp On Thursday, May 27, 2021 at 4:11:40 AM UTC+3 johnfor...@gmail.com wrote: > Here’s the code. It might be > possible to come up with a shorter reproducer, but I’m not sure where to

Re: [go-nuts] keep just 2 decimal places in a float64

2020-01-25 Thread Jamil Djadala
9 out. > Suggestions? Playground examples appreciated. you can use int types: https://play.golang.org/p/qLnynemd3S1 -- Jamil Djadala -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] querying whether the go command would run in module mode

2019-12-09 Thread Jamil Djadala
On Mon, 09 Dec 2019 19:57:48 +1030 Dan Kortschak wrote: > Thanks. > > When you're not in a module it returns /dev/null on linux. I don't > suppose this is platform independent? Hi, This command: go env GOMOD returns 1 emty line, i dont see any /dev/null ? -- Jamil Dja

Re: [go-nuts] Is anyone aware of a blocking ring buffer implementation?

2019-11-21 Thread Jamil Djadala
The data is copied directly from the Write to the corresponding Read (or Reads); there is no internal buffering and looking in implementation, it seems that internally Pipe is using channel. -- Jamil Djadala -- You received this message because you are subscribed to the Google Groups "golan

Re: [go-nuts] cgo memory fragmetation?

2019-10-07 Thread Jamil Djadala
eader)(unsafe.Pointer(bytes)) > header.Data = uintptr(data) > header.Len = size > header.Cap = size > } > > BR, > Miha > Hi, can you try to run your program with GOGC=10 environment ? -- Jamil Djadala -- You received this message because you are subscribed

[go-nuts] does any known tool for function (text) inlinig ?

2019-06-09 Thread djadala
Hi, is there any tool for function text (source code) inlinig, to be used with go generate ? thanks in advance. -- 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

[go-nuts] Re: constatnt conversion question

2019-05-21 Thread djadala
Thanks all for comments, for me confusion is that int( some_float_var) works, and surprisingly int( some_float_constant) does not. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] constatnt conversion question

2019-05-20 Thread djadala
Hi, does this should work ? package main import ( "fmt" ) func main() { const ( c = 2 z = 3.3 y = c * z x = int(y) // or x int = y ) fmt.Println(x) } it does not compile with error: constant 6.6 truncated to integer https://play.golang.org/p/f

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-25 Thread djadala
On Friday, April 26, 2019 at 9:12:06 AM UTC+3, Mike Schinkel wrote: > > On Thursday, April 25, 2019 at 10:20:54 AM UTC-4, Sam Whited wrote: >> >> On Wed, Apr 24, 2019, at 14:08, Mark Volkmann wrote: >> > Are there really developers that find this unreadable? >> > >> > color := temperature > 80

Re: [go-nuts] Re: methods on C types

2019-04-18 Thread Jamil Djadala
C.int, mapping return error codes from C api to go errors. -- Jamil Djadala -- 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...@goo

Re: [go-nuts] Re: methods on C types

2019-04-18 Thread Jamil Djadala
On Thu, 18 Apr 2019 07:44:53 -0700 (PDT) peterGo wrote: > Cgo translates C types into equivalent unexported Go types. > https://golang.org/cmd/cgo/ But then, definition of new methods on non-local types is forbidden. Why it is enabled for cgo types ? -- Jamil Djadala -- You receive

[go-nuts] methods on C types

2019-04-17 Thread djadala
Hi, where is documented that methods can be created on C types ? This works with go1.12.4, linux: https://play.golang.org/p/gXpHCFOgDDg package main import ( "C" "fmt" ) func (i *C.int) Inc() { *i++ } func main() { var i C.int i.Inc() fmt.Println(i) } Thanks -- You

[go-nuts] question about modules and VCS

2019-04-01 Thread djadala
Hi, As i understand, go get with modules on does't retrieve history from VCS, only snapshot of requested/calculated version. Is there a way to have full history with modules ? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

[go-nuts] Re: rand.Rand.Seed() vs rand.NewSource()

2019-03-27 Thread djadala
Hi, I think OP question actually is what is difference between: r := rand.New(rand.NewSource(VALUE)) and r := rand.New(rand.NewSource(ANYTHING)) r.Seed(VALUE) https://play.golang.org/p/afOfMjcNs1q -- You received this message because you are subscribed to the Google Groups "golang-nuts" grou

[go-nuts] why compiler do not accept elided type in this case ?

2019-03-18 Thread djadala
Hi, https://play.golang.org/p/hRHEuGG6zAf why composite literal in line 16 does not work ? thanks in advance. -- 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 gola

[go-nuts] Re: performance optimization

2018-12-19 Thread djadala
see https://github.com/golang/go/issues/27707 -- 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 options, visit ht

[go-nuts] regexp: is there a way to match single byte ?

2018-12-15 Thread djadala
Hi for example i want to match jpeg header: header :=`\xFF\xD8\xFF\xE0..\x4A\x46\x49\x46\x00` re := regexp.MustCompile(header) where in position of '.' i want to match any byte, not any (unicode) char. is this possible ? thanks in advance. Djadala -- You received this message b

[go-nuts] Re: os.WriteFile not writing files in long running process

2018-08-24 Thread djadala
Hi, did you write files in /tmp on linux ? (and there is daemon that clean old files in /tmp ?) Regards, Djadala -- 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, sen

[go-nuts] filepath.WalkFunc documentation question

2018-08-10 Thread djadala
but if the root parameter of Walk is ".", walk function is called with "a", not "./a". example: https://play.golang.org/p/PvRDSKo3KGz Is this intentional or incorrect documentation ? Regards, Djadala -- You received this message because you are subscribed to t

Re: [go-nuts] golang tcp transport just like nc

2018-03-08 Thread Jamil Djadala
7;my id is 3' > /tmp/3 > rm -rf /tmp/2 /tmp/4 > > > > > > ./nc serer < /tmp/1 > /tmp/2 > > > > ./nc < /tmp/3 > /tmp/4 > > > > please help me how to solve this and works like nc > > > example code > > htt

Re: [go-nuts] printing a struct fields that implements an error interface

2018-02-18 Thread Jamil Djadala
> Joe > Just use fmt.Print(v.String()) instead of fmt.Print(v) -- Jamil Djadala -- 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 gol

[go-nuts] Re: Implementation of sync.Once

2018-02-16 Thread djadala
nc (o *Once) Do(f func()) { > if !atomic.CompareAndSwapUint32(&o.done, 0, 1) { > return > } > f() > } > > You implementation returns immediately, if f() is still running, while in original implementation all concurrent calls to Do() returns when f() return. Djadala -

Re: [go-nuts] goto from inner select

2017-11-06 Thread djadala
er is telling you why. > Thanks for clear explanation > > > I trying to make priority select by nesting selects, and want to find > way to > > write logic only in one place. > > Use a function? Yes, i consider using functions, just wonder why goto does not work,

[go-nuts] goto from inner select

2017-11-06 Thread djadala
priority select by nesting selects, and want to find way to write logic only in one place. Regards, Jamil Djadala -- 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

[go-nuts] Re: how could a new user konw which packge should be used?

2017-11-06 Thread djadala
On Monday, November 6, 2017 at 12:23:37 PM UTC+2, Karan Chaudhary wrote: > > Another one: http://go-search.org > Go Search 756881 golang packages in 171083 projects indexed, last updated 265 days ago. 265 days ago. ??? No, thanks. -- You received this message b

[go-nuts] Re: How to pass a value to multiple readers of a shared channel

2017-10-15 Thread djadala
And here is some working code: https://play.golang.org/p/1Qt-LqKiph Djadala On Sunday, October 15, 2017 at 11:36:36 PM UTC+3, st ov wrote: > > A value sent through a channel can be read by only one reader, so once its > read its no longer available to other readers is that right? &g

[go-nuts] Re: How to pass a value to multiple readers of a shared channel

2017-10-15 Thread djadala
This post might help: https://rogpeppe.wordpress.com/2009/12/01/concurrent-idioms-1-broadcasting-values-in-go-with-linked-channels/ Djadala On Sunday, October 15, 2017 at 11:36:36 PM UTC+3, st ov wrote: > > A value sent through a channel can be read by only one reader, so once its > re

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread djadala
Again not tested: package main import ( "database/sql" "fmt" "log" _ "github.com/go-sql-driver/mysql" ) func main() { //Connect to database and check for errors db, err := sql.Open("mysql", "script:script1!@tcp(10.14.0.173:3306)/dbaTesti

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread djadala
vals[i] = &vals[i] } err = rows.Scan(vals...) // Now you can check each element of vals for nil-ness, if err != nil { log.Fatal(err) } for i := range cols { fmt.Println(vals[i]) } }

[go-nuts] Re: Copying slice over itself

2017-09-07 Thread djadala
Hi, Just check if backing array are same before copying: https://play.golang.org/p/MSqs-jRkSO On Thursday, September 7, 2017 at 8:54:16 AM UTC+3, Deepak Jois wrote: > > Hi > > Pls look at this code: https://play.golang.org/p/QfQOo1iyp4 > > I am copying a slice over itself. How does it work inter

Re: [go-nuts] Re: Reading bytes into uint32

2017-08-23 Thread djadala
Agree about hidden assumption, and may be alignment issues. Last try: https://play.golang.org/p/6e-i0AFZri Jamil Djadala On Thursday, August 24, 2017 at 1:40:52 AM UTC+3, Rob 'Commander' Pike wrote: > > Apologies, typo. This is it: https://play.golang.org/p/9XWoCiUH2D &g

[go-nuts] Re: Reading bytes into uint32

2017-08-23 Thread djadala
It use unsafe, but works even in playground: https://play.golang.org/p/S1rw157M9C On Wednesday, August 23, 2017 at 3:49:39 PM UTC+3, Christian von Kietzell wrote: > > Hi, > > I've stumbled across a problem I don't know how to solve. > > I'm trying to read (from stdin) four bytes into a uint32

[go-nuts] Re: Best way to truncate a ridiculously long string in GO

2017-08-21 Thread djadala
https://play.golang.org/p/YXXlJlsNGa Hi, i'm not sure if compiler is smart enough to optimize v1, but likely v2 ends in separate memory. On Tuesday, August 22, 2017 at 3:04:42 AM UTC+3, Travis Keep wrote: > > Suppose you have code like this > > > // verylongstring may be several thousand b

[go-nuts] Re: defer func() { _ = resp.Body.Close() }()

2017-08-17 Thread djadala
Useful additional info: https://mijailovic.net/2017/05/09/error-handling-patterns-in-go/ https://groups.google.com/forum/#!topic/golang-nuts/-eo7navkp10 On Wednesday, August 16, 2017 at 3:05:39 PM UTC+3, Gert wrote: > > To pass errcheck I need to do something like > > defer func() { _ = resp.Body.

[go-nuts] Re: Go based JSON Escape/Unescape

2017-08-13 Thread djadala
may be it is by default ? https://play.golang.org/p/e1mTTLt6zH On Monday, August 14, 2017 at 6:35:41 AM UTC+3, Tong Sun wrote: > > Has anyone done Go based JSON Escape/Unescape yet? > > I want to pass any arbitrary content as a JSON string: > > { > "content": "my escaped strings {\n

Re: [go-nuts] liteide x32.2 released

2017-08-04 Thread djadala
apt-get install apt-file apt-file update apt-file search libpng12.so libpng12-0: /lib/x86_64-linux-gnu/libpng12.so.0 libpng12-0: /lib/x86_64-linux-gnu/libpng12.so.0.50.0 libpng12-0: /usr/lib/x86_64-linux-gnu/libpng12.so.0 libpng12-dev: /usr/lib/x86_64-linux-gnu/libpng12.so On Friday, August 4,

Re: [go-nuts] Re: How to optimize as with -O2 from Gcc? (50x speedup)

2017-08-04 Thread djadala
again i'm wrong :( On Friday, August 4, 2017 at 10:30:14 AM UTC+3, Sebastien Binet wrote: > > > > On Fri, Aug 4, 2017 at 9:24 AM, > wrote: > >> Ok, >> i'm not right,pow in C is : >> float powf(float x, float y); >>long double powl(long double >> >> use float32 pow for proper comparison o

[go-nuts] Re: How to optimize as with -O2 from Gcc? (50x speedup)

2017-08-04 Thread djadala
Ok, i'm not right,pow in C is : float powf(float x, float y); long double powl(long double use float32 pow for proper comparison or use powl for C double wersion. This is demonstartion how when you use go long time, you lose ability to read other languages :) On Friday, August 4, 2017

[go-nuts] Re: How to optimize as with -O2 from Gcc? (50x speedup)

2017-08-04 Thread djadala
You are comparing apples to oranges( integer vs float64 pow), use integer pow and compare again: func Pow(a, b int) int { p := 1 for b > 0 { if b&1 != 0 { p *= a } b >>= 1 a *= a

Re: [go-nuts] errors package

2017-07-30 Thread djadala
also check errors package: https://godoc.org/github.com/pkg/errors On Sunday, July 30, 2017 at 12:56:25 PM UTC+3, Oleg Puchinin wrote: > > Cool ! Thank you ! > > Oleg. > > 2017-07-30 15:39 GMT+06:00 >: > >> >> https://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully >> >> >

Re: [go-nuts] errors package

2017-07-30 Thread djadala
https://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully On Sunday, July 30, 2017 at 11:40:59 AM UTC+3, Oleg Puchinin wrote: > > Hi ! > IMHO package "errors" bad. How in the program to check which error > actually occurred? > Well it is impossible on a string. > > Thank yo

[go-nuts] x/exp/shiny: is there a way to get screen DPI ?

2017-07-11 Thread djadala
Hi All, Question is in subject, May be i miss something obvious, but cant find how to get DPI golang.org/x/exp/shiny/screen doesn't mention anyting about dpi or resolution. thanks in advance, Djadala -- You received this message because you are subscribed to the Google Groups "g

[go-nuts] Re: [ANN] gos2: S2 geometry library in Go

2017-05-05 Thread djadala
Hi, this package is moved to https://github.com/golang/geo just in case you don't noticed. Djadala On Saturday, May 6, 2017 at 4:03:25 AM UTC+3, Matthew Hoggan wrote: > > I am trying to find a group associated with > https://code.google.com/archive/p/s2-geometry-library/. Th

[go-nuts] Re: How let go and c code work Alternately in the same thread

2017-04-28 Thread djadala
ain() { >> CWork(); >> } >> //go code >> func GoWork() { >> for { >> --Print Do GoWork >>--Coroutine Stop >> --switch back to CWork() >> } >> } > > > > Hi, simplest solution: //c code > void CWork() { >

[go-nuts] Re: Parsing base64 data with headers

2017-04-06 Thread djadala
https://golang.org/pkg/mime/multipart/ ? On Thursday, April 6, 2017 at 2:00:21 PM UTC+3, Ain wrote: > > Hi > > I get string which contains: > > MIME-Version: 1.0 > content-type: text/xml > content-transfer-encoding: base64 > > > PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPD94bWwtc3R5bGVz

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
gt; Il giorno martedì 28 marzo 2017 14:47:40 UTC+2, dja...@gmail.com ha > scritto: >> >> >> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) >> func(j tengin.Job) { go func(){ m.OnJob(j); m.Done()}() }(job) >> >> Djadala >> On Tuesday, March 28, 2017 at

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
>> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) func(j tengin.Job) { go func(){ m.OnJob(j); m.Done()}() }(job) Djadala On Tuesday, March 28, 2017 at 3:27:34 PM UTC+3, Danilo Cianfrone wrote: > > I'm experiencing a weird bug. > I have a microservice that uses FBP

[go-nuts] Re: Does sync.Cond call Lock() twice on the underlying Locker?

2017-03-13 Thread djadala
o Lock() again? > Hi, First, your custom Locker implements Locker interface, but does not lock as it call Unlock at function return. Second, Locker main job is to call Lock() multiple times (from different goroutines) Djadala -- You received this message because you are subscribed to the Goo

Re: [go-nuts] Re: Understanding garbage collection in Go with infinite lists

2017-03-03 Thread djadala
ess linked list where only the >>>> last list element is reachable from your code as this is the only value >>>> you have a pointer to. >>>> >>>> So the second produces tremendous amounts of garbage but this >>>> garbage is collectable. Runni

Re: [go-nuts] Re: Trying to understand := and named return values

2017-02-22 Thread djadala
on the left combines declaration > and simple assignment without allowing, much less requiring, the > programmer to explicitly identify which variables are being declared and > which are simply being assigned a new value. This is relevant when := > is used at the block scope as

[go-nuts] Re: Why get an element from []interface{} `arr[0] == nil` is not true?

2017-02-15 Thread djadala
On Wednesday, February 15, 2017 at 11:25:16 AM UTC+2, dja...@gmail.com wrote: > > > > On Wednesday, February 15, 2017 at 10:40:35 AM UTC+2, Felix Sun wrote: >> >> https://play.golang.org/p/qYA8Ddnnye >> >> ``` >> >> package main >> >> import ( >> "fmt" >> ) >> >> type Obj struct { >> One *Obj

[go-nuts] Re: Why get an element from []interface{} `arr[0] == nil` is not true?

2017-02-15 Thread djadala
mp;Obj{} > > var arr = []interface{}{o.One} > > fmt.Println(arr[0]) > fmt.Println("why this is not true?", arr[0] == nil) > } > > > ``` > > > Why `arr[0] == nil` is not true? > > Hi, there are misleading answers, so: First Println prints value of ar

[go-nuts] Re: fmt: Why Golang doesn't have fmt.Printlnf?

2017-02-07 Thread djadala
On Wednesday, February 8, 2017 at 3:58:55 AM UTC+2, 高橋誠二 wrote: > > fmt package have no *lnf method, but in other langs, > sometimes it implements Printlnf. > Is there any reason? > fmt.Printlnf(f,...) = fmt.Printf(f+"\n", ...) Djadala -- You received this message b

[go-nuts] Re: Priority cases in select?

2017-01-26 Thread djadala
le priority with only 2 nested selects: https://play.golang.org/p/ViI54yGyIm Djadala -- 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 options, visit https://groups.google.com/d/optout.

Re: [go-nuts] Reset Slice with Make Every Time?

2017-01-10 Thread djadala
MAX ), In that case old data will be garbage collected when GC runs. Djadala -- 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...@goo

[go-nuts] Re: how go cast multi return value type

2017-01-05 Thread djadala
do that > I just want to make my code short , and not wish to create useless temp > variable > > > Hi, you can use function to convert types: https://play.golang.org/p/2mBwvXhUI9 Djadala -- You received this message because you are subscribed to the Google Groups "golang

[go-nuts] Re: Check if previous value in template range is different

2017-01-04 Thread djadala
lice at beginning and pass to template data[1:] and data: https://play.golang.org/p/OnQPOJPsIp I don't know is there a better way. Djadala -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and sto

[go-nuts] Re: There has no Mutex.Trylock() implemention or similar method ?

2016-10-23 Thread djadala
Hi, Trylock is simple as: https://play.golang.org/p/rpy3Kg1KWW Regards, Djadala -- 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-nut

[go-nuts] Re: slice: copy to zero length slice

2016-10-02 Thread djadala
Hi, you want to use append, not copy: https://play.golang.org/p/1TXCsC4-GJ On Sunday, October 2, 2016 at 5:18:42 PM UTC+3, 高橋誠二 wrote: > > As official doc explains, copy to zero length slice results to be empty. > > package main > > import "fmt" > > func main() { > src := []int{1, 2, 3} >

Re: [go-nuts] Licenses

2016-09-30 Thread djadala
replies here, the answer to the question is > definitely yes, as long as you respect the requirements that the two > licenses impose on the fully linked program. People link BSD and > GPLv2 code together all the time. > > Ian > Thanks all for answers, Ian, can you

[go-nuts] Licenses

2016-09-29 Thread djadala
Hi, May be OT, but: Can i translate some GPLv2 licensed C code to GO, and publish it under BSD new license ? Code comments are from original C code. Also, Can I in my BSD licensed GO project, link to GPLv2 library ? Regards, Djadala -- You received this message because you are subscribed

[go-nuts] Re: Bug in go? Package net

2016-09-25 Thread djadala
don't ignore errors On Monday, September 26, 2016 at 5:53:01 AM UTC+3, Jon Strauss wrote: > > This error: > > panic: runtime error: invalid memory address or nil pointer dereference > > [signal 0xb code=0x1 addr=0x20 pc=0x401487] > > > goroutine 1 [running]: > > panic(0x50bfa0, 0xc82000a0c0) > > /

[go-nuts] Re: gorutine, channels

2016-09-02 Thread djadala
working examle: https://play.golang.org/p/KLZdle7R47 On Friday, September 2, 2016 at 8:07:32 PM UTC+3, Ринат Галиев wrote: > > Я не могу заставить работать попеременно 2 gorutines: > не использовать новый imports > использовать каналы > получить результаты: 1 2 3 4 5 6 > согte after "// Красноломк

[go-nuts] Re: gorutine, channels

2016-09-02 Thread djadala
On Friday, September 2, 2016 at 8:07:32 PM UTC+3, Ринат Галиев wrote: > > Я не могу заставить работать попеременно 2 gorutines: > не использовать новый imports > использовать каналы > получить результаты: 1 2 3 4 5 6 > согte after "// Красноломкий " > > Основной пакет > > // красноломкий > > имп

[go-nuts] Re: flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread djadala
s/fmt.String/fmt.Sprintf/ On Thursday, September 1, 2016 at 12:25:24 PM UTC+3, dja...@gmail.com wrote: > > Hi, > Do you know what infinite recursion is ? > fmt.String use your String method > > see https://play.golang.org/p/jeOilZW7JU > > > On Thursday, September 1, 2016 at 11:59:12 AM UTC+3, Muha

[go-nuts] Re: flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread djadala
Hi, Do you know what infinite recursion is ? fmt.String use your String method see https://play.golang.org/p/jeOilZW7JU On Thursday, September 1, 2016 at 11:59:12 AM UTC+3, Muhammad Shulhan wrote: > > Dear all, > > I will describe the problem step by step, please bear with me. > > Lets take a lo

[go-nuts] Re: dynamic frequency ticker

2016-08-30 Thread djadala
https://play.golang.org/p/FMs01ACKJv ? Djadala On Tuesday, August 30, 2016 at 8:46:23 PM UTC+3, seb@gmail.com wrote: > > In my application I select on a ticker channel, but sometimes need to have > the waiting time vary a bit. For not so frequent changes I could make a new

[go-nuts] Re: context race

2016-08-13 Thread djadala
nil* channel never returns, receiving on *closed* channel always return zero value. Djadala -- 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+

Re: [go-nuts] Re: SetKeepAlive TCP server

2016-07-26 Thread djadala
day, July 26, 2016 at 12:21:51 PM UTC-5, Matt Harden wrote: >> >> This is because your conn variable is probably of the type net.Conn (an >> interface) rather than *net.TCPConn, so the compiler doesn't know that the >> SetKeepAlive method is available. If you use a typ

[go-nuts] Re: SetKeepAlive TCP server

2016-07-26 Thread djadala
tryconn.(*TCPConn ).SetKeepAlive On Tuesday, July 26, 2016 at 10:04:41 AM UTC+3, EdgarAlejandro Vintimilla wrote: > > > > > when I use the conn.SetKeepAlive i get this error: reference to undefined > field or method ‘SetKeepAlive’ > > https://golang.org/p