mchirico / zDaily

Playground to hack and test ideas with Zoe
1 stars 2 forks source link

Day 14: Interactive Session #16

Open mchirico opened 3 years ago

mchirico commented 3 years ago

Do an interactive, programming session. I was thinking basic skills.

package main
import (
    "fmt"
)

type A struct {
    a string
    i int
    z []string
    k map[string]string
}

func NewA() *A {
    a := &A{}
    a.k = map[string]string{}

    return a
}

func (a *A)Dothing() string {

    a.a = fmt.Sprintf("This %d",a.i)

    a.z = append(a.z, "Mouse")
    a.z = append(a.z,"Noodle")

    a.k = map[string]string{}
    a.k["cat"] = "Mouse"

    return a.z[0]
}

// Can you see session chat?
func main(){
    fmt.Println("Hello Mouse")
}
//hello
tacomonkautobot[bot] commented 3 years ago

mchirico, Thanks for opening this issue!