Skip to content

deependujha/go-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Go resources

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published