Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamsher31/goistext
Check if filepath is a text file
https://github.com/shamsher31/goistext
Last synced: 4 days ago
JSON representation
Check if filepath is a text file
- Host: GitHub
- URL: https://github.com/shamsher31/goistext
- Owner: shamsher31
- License: mit
- Created: 2015-08-16T08:43:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T15:13:25.000Z (about 9 years ago)
- Last Synced: 2024-06-21T13:02:59.979Z (5 months ago)
- Language: Go
- Size: 145 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# goistext
[![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/shamsher31/goistext)
Check if filepath is a text file
### How to install
```go
go get github.com/shamsher31/goistext
```### How to use
```go
package mainimport (
"fmt"
"github.com/shamsher31/goistext"
)func main() {
fmt.Println(text.Is("./golang.txt"))
// true
}
```###Aliasing Imports
If you already have package name ```text``` you can use following.
```go
package mainimport (
"fmt"
pckText "github.com/shamsher31/goistext"
)func main() {
fmt.Println(pckText.Is("./golang.txt"))
// true
}
```### Related
[gotextext](https://github.com/shamsher31/gotextext)
[go-binary](https://github.com/ferhatelmas/go-binary)
[go-archive](https://github.com/ferhatelmas/go-archive)### Why
This package is inspired by [is-text-path](https://www.npmjs.com/package/is-text-path) npm module.### License
MIT © [Shamsher Ansari](https://github.com/shamsher31)