Interface Type

Interface names conventions By convention, one-method interfaces are named by the method name plus an -er suffix. Define an interface type It start with the keyword “type” follow by the interface name (ended with -er). Begin of a block of code symbol “{“, the function name (eg. Greeting() function and return a string ). One… Continue reading Interface Type

Published
Categorized as Interface

Go (1.15.6 or later) Installation and Setup in Windows 10 (Fresh Install)

Official Go download page, this link gives you more option to choose from OS platform and OS architecture x86-64 build. And you can use the go build command parameter to building a binary for an application that can run for CPU of x86 (386) and x86-64. https://golang.org/dl/ Install Open the MSI file you downloaded and… Continue reading Go (1.15.6 or later) Installation and Setup in Windows 10 (Fresh Install)

Range Over Slice and Map

https://repl.it/join/gdzplzna-shankuo  go build ./main1 -> shan kuo2 -> Hoi Leng3 -> Choi Yan4 -> Evelyn Chan

Literals in Regular Expression

Literals are the simplest form of pattern matching in regular expressions. They will simply succeed whenever that literal is found. func Match ¶ func Match(pattern string, b []byte) (matched bool, err error) Match reports whether the byte slice b contains any match of the regular expression pattern. Example Code Go Playground https://play.golang.org/p/ts3SyaxKQgF Resources go doc regexp/syntax https://pkg.go.dev/regexp?tab=doc#pkg-overview