This commit is contained in:
Muhan Li 2022-03-02 22:56:29 +08:00
parent f7041811b8
commit a80576fd53
5 changed files with 41 additions and 2 deletions

View File

@ -15,8 +15,16 @@ jobs:
with:
ref: ${{ github.head_ref }}
- name: Run generator
run: date +%s > ./docs/index.html
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Go Build
run: go build -o . main
- name: Run Generator
run: ./main > ./docs/index.html
- uses: stefanzweifel/git-auto-commit-action@v4
with:

1
.gitignore vendored
View File

@ -130,3 +130,4 @@ dmypy.json
# MacOs trash
.DS_Store
.idea/

9
data/2022.txt Normal file
View File

@ -0,0 +1,9 @@
// 数据来源 http://www.gov.cn/zhengce/content/2021-10/25/content_5644835.htm
// 数据格式 节日名;放假日期;补班日期 日期支持多选“,”和区间“-”
元旦;1.1-1.3;
春节;1.31-2.6;1.29,1.30
清明节;4.3-4.5;4.2
劳动节;4.30-5.4;4.24,5.7
端午节;6.3-6.5;
中秋节;9.10-9.12;
国庆节;10.1-10.7;10.8,10.9

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module main
go 1.18

18
main.go Normal file
View File

@ -0,0 +1,18 @@
package main
import (
"fmt"
"io/ioutil"
"log"
)
func main() {
files, err := ioutil.ReadDir("./data/")
if err != nil {
log.Fatal(err)
}
for _, file := range files {
fmt.Println(file.Name(), file.IsDir())
}
}