-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
49 lines (45 loc) · 1.82 KB
/
main.go
File metadata and controls
49 lines (45 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* --------------------------------------------------------------------------------
* Copyright (c) 2022-NOW(至今) 锋楪技术团队
* Author: 锋楪技术团队 (https://www.frontleaves.com)
*
* 本文件包含锋楪技术团队项目的源代码,项目的所有源代码均遵循 MIT 开源许可证协议。
* --------------------------------------------------------------------------------
* 许可证声明:
*
* 版权所有 (c) 2022-2025 锋楪技术团队。保留所有权利。
*
* 本软件是“按原样”提供的,没有任何形式的明示或暗示的保证,包括但不限于
* 对适销性、特定用途的适用性和非侵权性的暗示保证。在任何情况下,
* 作者或版权持有人均不承担因软件或软件的使用或其他交易而产生的、
* 由此引起的或以任何方式与此软件有关的任何索赔、损害或其他责任。
*
* 使用本软件即表示您了解此声明并同意其条款。
*
* 有关 MIT 许可证的更多信息,请查看项目根目录下的 LICENSE 文件或访问:
* https://opensource.org/licenses/MIT
* --------------------------------------------------------------------------------
* 免责声明:
*
* 使用本软件的风险由用户自担。作者或版权持有人在法律允许的最大范围内,
* 对因使用本软件内容而导致的任何直接或间接的损失不承担任何责任。
* --------------------------------------------------------------------------------
*/
package main
import (
"embed"
"fmt"
"github.com/pelletier/go-toml"
)
//go:embed resources/*
var resourcesFile embed.FS
func main() {
CheckFileExist(resourcesFile)
// 读取 TOML 文件
config, err := toml.LoadFile("configuration.toml")
if err != nil {
fmt.Println("Error reading TOML file:", err)
return
}
Cli(config, resourcesFile)
}