Skip to content

Commit f2b6ec6

Browse files
committed
docs: optimize readme
1 parent f80c38a commit f2b6ec6

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

README.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ If you see a problem that you'd like to see fixed, the best way to make it happe
1111

1212
You can also ask for problem-solving ideas and discuss in GitHub issues directly.
1313

14-
# INDEX
15-
16-
- [Overview](#overview)
17-
- [Usage](#usage)
18-
19-
# Overview
20-
21-
In specified package, provides some practical util, as below:
22-
23-
- `format`: format a `time` value to `string`, such as `GetYyyyMmDdHhMmSs`,
24-
- `parse`: parse a `string` value to `time`, such as `GetYyyyMmDdHhMmSs`.
25-
26-
A time toolkit written in Go.
27-
2814
# Usage
2915

3016
Firstly, download this pkg,
@@ -38,8 +24,6 @@ Secondly, use it.
3824
```go
3925
import (
4026
"github.com/guobinhit/auxo"
41-
"github.com/guobinhit/auxo/format"
42-
"github.com/guobinhit/auxo/parse"
4327
)
4428

4529
// Get a specified time by add days, such as d is 2022-04-13 10:20:30 and days is 10,
@@ -48,16 +32,16 @@ aDate := auxo.GetTimeAddDays(time.Now(), 10)
4832

4933
// Get a specified date format time string of common version, such as d is 2022-04-13 10:20:30,
5034
// then aString is "2022-04-23 10:20:30"
51-
aString := format.GetYyyyMmDdHhMmSs(time.Now())
35+
aString := auxo.FormatYyyyMmDdHhMmSs(time.Now())
5236

5337
// Get a specified date format time string of china version, such as d is 2022-04-13 10:20:30,
54-
// then aString2 is "2022年04月23日 10:20:30", like GetCnOfYyyyMmDdHhMmSs method,
55-
// GetEnOfYyyyMmDdHhMmSs return "2022/04/23 10:20:30" and GetCptOfYyyyMmDdHhMmSs return "20220423102030".
56-
aString2 := format.GetCnOfYyyyMmDdHhMmSs(time.Now())
38+
// then aString2 is "2022年04月23日 10:20:30", like FormatCnOfYyyyMmDdHhMmSs method,
39+
// FormatEnOfYyyyMmDdHhMmSs return "2022/04/23 10:20:30" and FormatCptOfYyyyMmDdHhMmSs return "20220423102030".
40+
aString2 := auxo.FormatCnOfYyyyMmDdHhMmSs(time.Now())
5741

5842
// Get a specified date format time, such as dStr is "2022-04-13 10:20:30",
5943
// then aTime is 2022-04-23 10:20:30
60-
aTime, err := parse.GetYyyyMmDdHhMmSs("2022-04-13 10:20:30")
44+
aTime, err := auxo.ParseYyyyMmDdHhMmSs("2022-04-13 10:20:30")
6145
```
6246

6347
Finally, good luck guys!

0 commit comments

Comments
 (0)