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: doctor.go
    path of file: ./repos/cockroach/pkg/cli
    
    the code of the file until where you have to start completion: // Copyright 2020 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date
    
func parseJSONFile(zipDirPath string, fileName string, result interface{}) error {
	filePath := path.Join(zipDirPath, fileName)
	// Check for existence of companion .err.txt file.
	_, err := os.Stat(filePath + ".err.txt")
	if err == nil {
		// A .err.txt file exists.
		fmt.Printf("WARNING: errors occurred during the production of %s, contents may be missing or incomplete.\n", fileName)
	} else if !errors.Is(err, os.ErrNotExist) {
		// Handle unexpected errors.
		return err
	}

	f, err := os.Open(filePath)
	if err != nil {
		return err
	}
	defer f.Close()
	decoder := json.NewDecoder(f)
	return decoder.Decode(result)
}