Sobes.tech
Junior — Senior

Comparison of interface variable values

livecode

Task condition

Determine what result will be output when executing the following program.

type MemRepo struct {
  Data string
}

type Repository interface{}

func CreateRepoA() Repository {
  var ptr *MemRepo
  return ptr
}

func CreateRepoB() Repository {
  return nil
}

func main() {
  fmt.Println(CreateRepoA() == CreateRepoB())
}