Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add method PossibleTypes and fix ms-office matchers' rules #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants