Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "log"
- )
- func main() {
- m := make(map[string]string)
- m["Go"] = "Beego"
- m["Python"] = "Django"
- m["Ruby"] = "Rails"
- m["PHP"] = "Laravel"
- v, ok := m["Go"]
- if !ok {
- log.Fatal("It should be true")
- }
- if !(v == "Beego") {
- log.Fatal("Wrong value")
- }
- _, ok = m["Java"]
- if !(ok == false) {
- log.Fatal("It should be false")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement