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: util.go
    path of file: ./repos/gopeed/internal/test
    
    the code of the file until where you have to start completion: package test

import (
	"crypto/md5"
	"encoding/hex"
	"encoding/json"
	"io"
	"os"
	"path/filepath"
)

func FileMd5(filePath string) string {
	file, err := os.Open(filePa
    
func DirMd5(dirPath string) string {
	hash := md5.New()
	filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
		if info.IsDir() {
			return nil
		}
		file, err := os.Open(path)
		if err != nil {
			return err
		}
		if _, err := io.Copy(hash, file); err != nil {
			return err
		}
		return nil
	})
	return hex.EncodeToString(hash.Sum(nil))
}