Deep Dive into Golang Named Returns

package main

import "fmt"

func main() {
    fmt.Println("\nStart of test")


    fmt.Println("\nEnd of test")

func goTest() (test string) {
    fmt.Println("\nStart of func goTest()")

    test = "Test One"
    fmt.Println("test 1:", test)

    defer func(tst string) {
        fmt.Println("test 2:", test)
        fmt.Println("test 3:", tst)
        test = "Test Three"

    return "Test Two"
Daniel Morell

Daniel Morell

I am a self-taught web developer with a passion for SEO, creating stunning websites, and organic marketing. I am a perfectionist. That means I get obsessed with the nitty-gritty details.

I live in Wisconsin's Fox Valley with my beautiful wife Emily.

Daniel Morell

I am a self-taught web developer, SEO, and builder of things (mostly digital).

I started with just HTML and CSS, and now I mostly work with Python, PHP, JS, and Golang. The web has a lot of problems both technically and socially. I'm here fighting to make it a better place.

© 2018 Daniel Morell.
+ Daniel + = this website.