package meta

import (
	"encoding/binary"
	"io/ioutil"
)

// Application contains third party application specific data.
//
// ref: https://www.xiph.org/flac/format.html#metadata_block_application
type Application struct {
	// Registered application ID.
	//
	// ref: https://www.xiph.org/flac/id.html
	ID uint32
	// Application data.
	Data []byte
}

// parseApplication reads and parses the body of an Application metadata block.
func (block *Block) parseApplication() error {
	app := new(Application)
	err := binary.Read(block.lr, binary.BigEndian, &app.ID)
	if err != nil {
		return err
	}
	app.Data, err = ioutil.ReadAll(block.lr)
	return err
}

package meta

// Application contains third party application specific data.
//
// ref: https://www.xiph.org/flac/format.html#metadata_block_application
type Application struct {
	// Registered application ID.
	//
	// ref: https://www.xiph.org/flac/id.html
	ID uint32
	// Application data.
	Data []byte
}

// parseApplication reads and parses the body of an Application metadata block.
func (block *Block) parseApplication() error {
	panic("not yet implemented.")
}

--- 
+++ 
@@ -1,4 +1,9 @@
 package meta
+
+import (
+	"encoding/binary"
+	"io/ioutil"
+)
 
 // Application contains third party application specific data.
 //
@@ -14,5 +19,11 @@
 
 // parseApplication reads and parses the body of an Application metadata block.
 func (block *Block) parseApplication() error {
-	panic("not yet implemented.")
+	app := new(Application)
+	err := binary.Read(block.lr, binary.BigEndian, &app.ID)
+	if err != nil {
+		return err
+	}
+	app.Data, err = ioutil.ReadAll(block.lr)
+	return err
 }
meta: Implement the parseApplication method of Block.
