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: wav.go
    path of file: ./repos/oak/audio/format/wav
    
    the code of the file until where you have to start completion: // Package wav provides functionality to handle .wav files and .wav encoded data.
//
// This package may be imported solely to register wavs as a parseable file type within oak:
//
//     import (
//         _ "github.com/oakmound/oak/v4/audio/format/wav"
//     )
//
package wav

import (
	"io"

	"encoding/binary"

	"github.com/oakmound/oak/v4/audio/format"
	"github.com/oakmound/oak/v4/audio/pcm"
)

func init() {
	format.Register(".wav", Load)
}

// Load reads a WAV header from a reader, parsing it's PCM format and returning
// a pcm Reader fo
    
func readData(r io.Reader) (data, error) {
	data := data{}

	err := binary.Read(r, binary.BigEndian, &data.bChunkID)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.ChunkSize)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.BigEndian, &data.bFormat)
	if err != nil {
		return data, err
	}

	err = binary.Read(r, binary.BigEndian, &data.bSubchunk1ID)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.Subchunk1Size)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.AudioFormat)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.NumChannels)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.SampleRate)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.ByteRate)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.BlockAlign)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.BitsPerSample)
	if err != nil {
		return data, err
	}

	err = binary.Read(r, binary.BigEndian, &data.bSubchunk2ID)
	if err != nil {
		return data, err
	}
	err = binary.Read(r, binary.LittleEndian, &data.Subchunk2Size)
	if err != nil {
		return data, err
	}
	return data, nil
}