Skip to content

Commit

Permalink
Add more v1.x changes in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-vasile committed Dec 10, 2019
1 parent 69083ea commit bfdf4e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 2 additions & 6 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Examples
[Detect MIME type](#detect)

[Check against MIME type](#check)

[Check base MIME type](#check-parent)

### Detect
Expand Down Expand Up @@ -52,9 +54,3 @@ fmt.Println(isText, err)

// Output: true <nil>
```
When calling `DetectReader` on a `ReadSeeker` interface, such as `os.File`, make sure
to reset the offset of the reader to the beginning if needed:
```go
_, err = file.Seek(0, io.SeekStart)
```

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ In v1.x the detect functions no longer return the MIME type and extension as
strings. Instead they return a [MIME](https://godoc.org/github.com/gabriel-vasile/mimetype#MIME)
struct. To get the string value of the MIME and the extension, call the
`String()` and the `Extension()` methods.
In order to play better with the stdlib `mime` package, v1.x extensions

In order to play better with the stdlib `mime` package, v1.x file extensions
include the leading dot, as in ".html".

In v1.x the `text/plain` MIME type is `text/plain; charset=utf-8`.

## Supported MIME types
See [supported mimes](supported_mimes.md) for the list of detected MIME types.
If support is needed for a specific file format, please open an [issue](https://github.com/gabriel-vasile/mimetype/issues/new/choose).
Expand Down

0 comments on commit bfdf4e7

Please sign in to comment.