Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zgwit committed Dec 5, 2023
1 parent f755193 commit 0badbbe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package config

import (
"github.com/spf13/pflag"
"github.com/spf13/viper"
"github.com/zgwit/iot-master/v4/lib"
)
Expand All @@ -16,7 +15,8 @@ func init() {
viper.AddConfigPath(".")
//viper.SetEnvPrefix("database")

_ = viper.BindPFlags(pflag.CommandLine)
//绑定命令行参数
//_ = viper.BindPFlags(pflag.CommandLine)
}

func Load() error {
Expand Down
12 changes: 12 additions & 0 deletions types/project.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package types

import "time"

type Project struct {
Id string `json:"id" xorm:"pk"`
Name string `json:"name"`
Desc string `json:"desc,omitempty"`
Version string `json:"version,omitempty"`

Created time.Time `json:"created,omitempty" xorm:"created"`
}

0 comments on commit 0badbbe

Please sign in to comment.