improvements

Former-commit-id: e648350a0ca0af302ba8b929ac653433beb0e61c
This commit is contained in:
Henrique Dias
2017-06-25 09:11:25 +01:00
parent 61a9a30c0e
commit 048c69af22
35 changed files with 4335 additions and 15 deletions

View File

@@ -77,7 +77,7 @@ var textExtensions = [...]string{
// RetrieveFileType obtains the mimetype and a simplified internal Type
// using the first 512 bytes from the file.
func (i FileInfo) RetrieveFileType() error {
func (i *FileInfo) RetrieveFileType() error {
i.Mimetype = mime.TypeByExtension(i.Extension)
if i.Mimetype == "" {
@@ -128,7 +128,7 @@ func (i FileInfo) RetrieveFileType() error {
}
// Reads the file.
func (i FileInfo) Read() error {
func (i *FileInfo) Read() error {
if len(i.content) != 0 {
return nil
}