mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-08-02 21:02:15 +02:00
initial import
This commit is contained in:
17
best-practices/empty-string-check/main.go
Normal file
17
best-practices/empty-string-check/main.go
Normal file
@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
s := ""
|
||||
|
||||
if len(s) == 0 {
|
||||
fmt.Println("string ist leer")
|
||||
}
|
||||
|
||||
if s == "" {
|
||||
fmt.Println("string ist leer")
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user