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: ListNode.go
    path of file: ./repos/awesome-golang-algorithm/leetcode/101-200/0138.Copy-List-with-Random-Pointer
    
    the code of the file until where you have to start completion: package Solution

import (
	"fmt"
	"math/rand"
)

type ListNode struct {
	Val  int
	Next *ListNode
}

//	正确解
//func Solution(head *ListNode) *ListNode {
//	var prev *List
    
func UnmarshalListBySlice(nums []int) *ListNode {
	head := &ListNode{Val: -1, Next: nil}
	tmp := head
	for _, v := range nums {
		tmp.Next = &ListNode{Val: v, Next: nil}
		tmp = tmp.Next
	}
	return head.Next
}