// Copyright 2016 Albert Nigmatzianov. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package id3v2

import (
	"io"

	"github.com/bogem/id3v2/util"
)

// UnknownFrame is used for frames, which id3v2 so far doesn't know how to
// parse and write it. It just contains an unparsed byte body of the frame.
type UnknownFrame struct {
	Body []byte
}

func (uf UnknownFrame) Size() int {
	return len(uf.Body)
}

func (uf UnknownFrame) WriteTo(w io.Writer) (n int64, err error) {
	var i int
	i, err = w.Write(uf.Body)
	return int64(i), err
}

func parseUnknownFrame(rd io.Reader) (Framer, error) {
	body, err := util.ReadAll(rd)
	return UnknownFrame{Body: body}, err
}

// Copyright 2016 Albert Nigmatzianov. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package id3v2

import (
	"io"

	"github.com/bogem/id3v2/util"
)

// UnknownFrame is used for frames, which id3v2 so far doesn't know how to
// parse and write it. It just contains an unparsed byte body of the frame.
type UnknownFrame struct {
	Body []byte
}

func (uk UnknownFrame) Size() int {
	return len(uk.Body)
}

func (uk UnknownFrame) WriteTo(w io.Writer) (n int64, err error) {
	var i int
	i, err = w.Write(uk.Body)
	return int64(i), err
}

func parseUnknownFrame(rd io.Reader) (Framer, error) {
	body, err := util.ReadAll(rd)
	return UnknownFrame{Body: body}, err
}

--- 
+++ 
@@ -16,13 +16,13 @@
 	Body []byte
 }
 
-func (uk UnknownFrame) Size() int {
-	return len(uk.Body)
+func (uf UnknownFrame) Size() int {
+	return len(uf.Body)
 }
 
-func (uk UnknownFrame) WriteTo(w io.Writer) (n int64, err error) {
+func (uf UnknownFrame) WriteTo(w io.Writer) (n int64, err error) {
 	var i int
-	i, err = w.Write(uk.Body)
+	i, err = w.Write(uf.Body)
 	return int64(i), err
 }
 
Rename uk to uf in UnknownFrame
