You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 129. Sum Root to Leaf Numbers.go
    path of file: ./repos/LeetCode-Go/leetcode/0129.Sum-Root-to-Leaf-Numbers
    
    the code of the file until where you have to start completion: package leetcode

import (
	"github.com/halfrost/LeetCode-Go/structures"
)


    
func dfs(root *TreeNode, sum int, res *int) {
	if root == nil {
		return
	}
	sum = sum*10 + root.Val
	if root.Left == nil && root.Right == nil {
		*res += sum
		return
	}
	dfs(root.Left, sum, res)
	dfs(root.Right, sum, res)
}