GO 언어 문법 (type에 method 추가하기) #3
go version go1.18 windows/amd64 main.go package main import ( "fmt" dict "scraping/typeExample/main/detail" ) func main() { // 이것은 Dictionary에 대한 Constructor가 아님!!!!!! dict := dict.Dictionary{"Donz": "I'm a boy"} dict["hello"] = "I'm find" fmt.Println("Setting :", dict) //-> Setting : map[Donz:I'm a boy hello:I'm find] // Search s, err := dict.Search("Donz") if err != nil { fmt.Println(" Search ..
2022.03.30