package test

import (
	"fmt"
	"github.com/gabriel-vasile/mimetype"
	"os"
	"testing"
)

func TestName(t *testing.T) {
	mtype, _ := mimetype.DetectFile("./1")

	t.Log(mtype.String(), mtype.Extension(), mtype.Is("application/octet-stream"))
	for i := 1; i <= 5; i++ {
		file, _ := os.Open(fmt.Sprintf("./%d", i))
		var buf = make([]byte, 100)
		n, _ := file.Read(buf)
		t.Log(n, buf)
		file.Close()
	}

}
