1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-05 05:12:26 +08:00

Compare commits

...

3 Commits

Author SHA1 Message Date
dudaodong
62c570d29b update version 2021-11-29 20:24:28 +08:00
dudaodong
4e5d3c2603 fix: fix IsExist function in fileutil/file.go 2021-11-29 20:23:26 +08:00
dudaodong
561b590e13 update: fix misspell in readme file 2021-11-29 20:02:55 +08:00
4 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
<div align="center" style="text-align: center;">
![Go version](https://img.shields.io/badge/go-%3E%3D1.16<recommend>-9cf)
[![Release](https://img.shields.io/badge/release-1.0.3-green.svg)](https://github.com/duke-git/lancet/releases)
[![Release](https://img.shields.io/badge/release-1.0.4-green.svg)](https://github.com/duke-git/lancet/releases)
[![GoDoc](https://godoc.org/github.com//duke-git/lancet?status.svg)](https://pkg.go.dev/github.com/duke-git/lancet)
[![Go Report Card](https://goreportcard.com/badge/github.com/duke-git/lancet)](https://goreportcard.com/report/github.com/duke-git/lancet)
[![codecov](https://codecov.io/gh/duke-git/lancet/branch/main/graph/badge.svg?token=FC48T1F078)](https://codecov.io/gh/duke-git/lancet)

View File

@@ -6,7 +6,7 @@
<div align="center" style="text-align: center;">
![Go version](https://img.shields.io/badge/go-%3E%3D1.16<recommend>-9cf)
[![Release](https://img.shields.io/badge/release-1.0.3-green.svg)](https://github.com/duke-git/lancet/releases)
[![Release](https://img.shields.io/badge/release-1.0.4-green.svg)](https://github.com/duke-git/lancet/releases)
[![GoDoc](https://godoc.org/github.com//duke-git/lancet?status.svg)](https://pkg.go.dev/github.com/duke-git/lancet)
[![Go Report Card](https://goreportcard.com/badge/github.com/duke-git/lancet)](https://goreportcard.com/report/github.com/duke-git/lancet)
[![codecov](https://codecov.io/gh/duke-git/lancet/branch/main/graph/badge.svg?token=FC48T1F078)](https://codecov.io/gh/duke-git/lancet)
@@ -63,7 +63,7 @@ func main() {
#### 1. convertor数据转换包
- 转换函数支持常用数据类型之间的转换
- 导入包import "github.com/duke-git/lancet/cryptor"
- 导入包import "github.com/duke-git/lancet/convertor"
```go
package main

View File

@@ -17,7 +17,7 @@ func IsExist(path string) bool {
if err == nil {
return true
}
if errors.Is(err, os.ErrExist) {
if errors.Is(err, os.ErrNotExist) {
return false
}
return false

View File

@@ -9,8 +9,8 @@ import (
)
func TestIsExist(t *testing.T) {
cases := []string{"./", "./a.txt"}
expected := []bool{true, false}
cases := []string{"./", "./file.go", "./a.txt"}
expected := []bool{true, true, false}
for i := 0; i < len(cases); i++ {
res := IsExist(cases[i])