如何从嵌套函数修改struct boolean?

Setting a struct from inside a nested func doesn't work.

I've already tried the examples from the documentation: https://play.golang.org/p/Pw9f20zwja

type myStruct struct {
    abrakadabra bool 
}

func (f *ChangeMe) SetName(abrakadabra bool) {
    f.abrakadabra = true
}

func something() {
    var flag ChangeMe
    f := new(ChangeMe)

    copy := func(r io.ReadCloser, w io.WriteCloser) {
        //...some code..

        if err != nil { 
            f.SetName(true)
            log.Println(flag.abrakadabra)
        }
    } 

in the log print - the abrakadabra boolean remains false (starter value), why doesn't it change to true?

You're running SetName on f, then printing the value from flag. f and flag are two different values of type ChangeMe.

f.SetName(true)
log.Println(f.abrakadabra)

or

flag.SetName(true)
log.Println(flag.abrakadabra)