Pada Thu, 1 Sep 2016 21:10:44 +0200
Harald Weidner menulis:
> Hello,
>
> On Thu, Sep 01, 2016 at 01:59:12AM -0700, Muhammad Shulhan wrote:
>
> > > type Slices []string
> > >
> > > func (sl *Slices) String() string {
> > > return fmt.Sprint(sl)
> > > }
>
> > runtime: goroutine stack excee
Hello,
On Thu, Sep 01, 2016 at 01:59:12AM -0700, Muhammad Shulhan wrote:
> > type Slices []string
> >
> > func (sl *Slices) String() string {
> > return fmt.Sprint(sl)
> > }
> runtime: goroutine stack exceeds 25000-byte limit
> fatal error: stack overflow
It is always dangerous to call
Dear all,
I will describe the problem step by step, please bear with me.
Lets take a look at first example ,
package main
>
> import (
> "fmt"
> )
>
> type Slices []string
>
> func (sl *Slices) String() string {
> // OK
> return fmt.Sprint(sl)
> }
>
> func main() {
> var slices Slices
>
> f