gobuch/best-practices/empty-string-check/main.go

18 lines
161 B
Go
Raw Permalink Normal View History

2020-08-21 04:26:40 +00:00
package main
import "fmt"
func main() {
s := ""
if len(s) == 0 {
fmt.Println("string ist leer")
}
if s == "" {
fmt.Println("string ist leer")
}
}