Skip to content

Conversation

@DarthPestilane
Copy link

// PossibleTypes returns the possible mime types of given bytes
func PossibleTypes(b []byte) ([]types.Type, error) {
	if len(b) == 0 {
		return nil, ErrEmptyBuffer
	}
	possibleTypes := []types.Type{}
	for _, checker := range Matchers {
		matchedType := checker(b)
		if matchedType != types.Unknown && matchedType.Extension != "" {
			possibleTypes = append(possibleTypes, matchedType)
		}
	}
	return possibleTypes, nil
}

and also change the rules of matching Microsoft office documents.

@DarthPestilane
Copy link
Author

Whoops The command "go get -u -v github.com/golang/lint/golint" failed and exited with 2 during .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants