Binary tree isSame() Please help me review this code. I want to make it both accurate and more Go-styled.

Go Playground code

package main

import(
    "fmt"
)

type TreeNode struct {
    val int
    left *TreeNode
    right *TreeNode

}

func isSameTree(p *TreeNode , q *TreeNode ) (bool){
    if p == nil &amp;&amp; q == nil {
        return true
    } 
    if p != nil &amp;&amp; q == nil{
        return false;
    }
    if p ==nil &amp;&amp; q != nil {
        return false;
    }
    if (p.val == q.val) &amp;&amp; (isSameTree(p.left,q.left)) &amp;&amp; (isSameTree(p.right ,q.right)){
        return true;
    } else {
        return false;
    }
}
func main(){
    p := &amp;TreeNode{val: 1}
    p.left = &amp;TreeNode{val: 2}
    p.right = &amp;TreeNode{val: 3}

    q := &amp;TreeNode{val: 1}
    q.left = &amp;TreeNode{val: 2}
    q.right = &amp;TreeNode{val: 3}

    isSame := isSameTree(p,q)
    fmt.Println("is same?: ", isSame)
}
A quick way to make your code more Go-styled is to have it automatically formatted.  Specifically, spaces are a bit off.  For example, in the isSameTree() signature, you have a space before a comma, a space before the closing parenthesis, and no space before the opening brace.  The parentheses around (bool) are unnecessary.  You're also writing semicolons inconsistently.

The isSameTree() implementation is a bit confusing ("A but not B and not C.  If you made it this far, check D and E and F?").  It would be clearer as one long affirmative expression.

func isSameTree(p *TreeNode, q *TreeNode) bool {
        return (p == nil &amp;&amp; q == nil) ||
               (p != nil &amp;&amp; q != nil &amp;&amp;
                p.val == q.val &amp;&amp;
                isSameTree(p.left, q.left) &amp;&amp; isSameTree(p.right, q.right))
}