read token from config
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
type ConfigInterface interface {
|
||||
GetVersion() string
|
||||
GetToken() string
|
||||
GetDirectories() []string
|
||||
MeetsConditions(directory, fileID, fileName string) bool
|
||||
}
|
||||
|
||||
@@ -2,4 +2,5 @@ package config
|
||||
|
||||
type ZurgConfig struct {
|
||||
Version string `yaml:"zurg"`
|
||||
Token string `yaml:"token"`
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@ func (z *ZurgConfigV1) GetVersion() string {
|
||||
return "v1"
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) GetToken() string {
|
||||
return z.Token
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) GetDirectories() []string {
|
||||
var rootDirectories []string
|
||||
for directory := range z.Directories {
|
||||
|
||||
Reference in New Issue
Block a user