initial commit
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package main
|
package config
|
||||||
|
|
||||||
type ConfigContainerType string
|
type ConfigContainerType string
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
package main
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
@@ -1,4 +1,4 @@
|
|||||||
package main
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
9
main.go
9
main.go
@@ -1,6 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "log"
|
import (
|
||||||
|
"gitea.v39.writerpass.top/Public/json-configure-golang/config"
|
||||||
|
"log"
|
||||||
|
)
|
||||||
|
|
||||||
type AppConfig struct {
|
type AppConfig struct {
|
||||||
AppName string `json:"app_name"`
|
AppName string `json:"app_name"`
|
||||||
@@ -11,9 +14,9 @@ func main() {
|
|||||||
configure := AppConfig{
|
configure := AppConfig{
|
||||||
AppName: "test-app-name",
|
AppName: "test-app-name",
|
||||||
}
|
}
|
||||||
cc := ConfigConfigure{
|
cc := config.ConfigConfigure{
|
||||||
AppName: "json-configure",
|
AppName: "json-configure",
|
||||||
ContainerType: BesidesExe,
|
ContainerType: config.BesidesExe,
|
||||||
ConfigureFile: "config.json",
|
ConfigureFile: "config.json",
|
||||||
}
|
}
|
||||||
cc.Check()
|
cc.Check()
|
||||||
|
Reference in New Issue
Block a user