diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ff84bbf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 李光春 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d82c0f --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +

+Golang Files +

+ +📦 Golang Files + +[comment]: <> (go) +[![godoc](https://pkg.go.dev/badge/go.dtapp.net/gofiles?status.svg)](https://pkg.go.dev/go.dtapp.net/gofiles) +[![goproxy.cn](https://goproxy.cn/stats/go.dtapp.net/gofiles/badges/download-count.svg)](https://goproxy.cn/stats/go.dtapp.net/gofiles) +[![goreportcard.com](https://goreportcard.com/badge/go.dtapp.net/gofiles)](https://goreportcard.com/report/go.dtapp.net/gofiles) +[![deps.dev](https://img.shields.io/badge/deps-go-red.svg)](https://deps.dev/go/go.dtapp.net%2Fgofiles) + +#### 安装 + +```go +go get -v -u go.dtapp.net/gofiles +``` diff --git a/gofiles.go b/gofiles.go index c07563b..efea1a3 100644 --- a/gofiles.go +++ b/gofiles.go @@ -105,6 +105,7 @@ func CreateDir(path string) error { func logn(n, b float64) float64 { return math.Log(n) / math.Log(b) } + func humanateBytes(s uint64, base float64, sizes []string) string { if s < 10 { return fmt.Sprintf("%dB", s) diff --git a/version.go b/version.go index 44c2773..7e408a9 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package gofiles -const Version = "1.0.0" +const Version = "1.0.1"