The TreeNode.New method expects the first parameter to be string. So, you need to either provide some string variable or provide the class name in string format: TreeNode.New("className", tree). Co, it could be like: TreeNode.New("Contact.Email", tree)