02.session

command
v1.0.3-0...-4db7b2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 5 Imported by: 0

README

why in 02.session/main.go at line 49 these code works fine


package main

import (
	"fmt"
)

func main() {
	m := make(map[string]int)
	//m := map[string]int{}

    // while map filled a value(s), this map return 2 params (value(s) & bool)
	m["mcleod"] = 45  

	toddAge, ok := m["mcleod"]
	if ok == true{
		fmt.Println(toddAge, ok)
	}
	return
}

//it will print
//45 true

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL