Skip to content

Latest commit

 

History

History
84 lines (62 loc) · 2.16 KB

README.md

File metadata and controls

84 lines (62 loc) · 2.16 KB

Go Codes

  • Document you go code using godoc

Basic Go features

Go pass arguments to file
for i, val := range os.Args{
        fmt.Println!("i", i, "; val", val)
    }
Yield in go
func YieldFunction() <-chan int {
    ch := make(chan int)
    go func() {
        defer close(ch)
        for i := 0; i < 10; i++ {
            ch <- i // Yield data to the consumer
        }
    }()
    return ch
}

func main() {
    data := YieldFunction()
    for val := range data {
        // Process data concurrently
        fmt.Println(val)
    }
}

Cool CLI projects


libraries


CLI


WebDev (Backend)

Publish Go package (cli/ library)