critical_mass
0
Q:

if statement string compare go

import "strings"

// if string found in name it returns 0 else 1
if strings.Compare(name, "compare string") == 1 {
	// Do something
}
0
import "strings"

// if string found in name it returns 0 else 1
if strings.Compare(command, "h") == 0 {
  // Do something
}
0

New to Communities?

Join the community