Rework files to use strings instead of duplicate functions
There's too many functions at this point.
This commit is contained in:
parent
d437c68403
commit
21fac37597
7 changed files with 217 additions and 96 deletions
|
|
@ -16,9 +16,7 @@ var (
|
|||
DomainNidus string
|
||||
DomainTegola string
|
||||
Environment string
|
||||
FilesDirectoryLogo string
|
||||
FilesDirectoryPublic string
|
||||
FilesDirectoryUser string
|
||||
FilesDirectory string
|
||||
FieldseekerSchemaDirectory string
|
||||
ForwardEmailAPIToken string
|
||||
ForwardEmailReportAddress string
|
||||
|
|
@ -100,17 +98,9 @@ func Parse() (err error) {
|
|||
if FieldseekerSchemaDirectory == "" {
|
||||
return fmt.Errorf("You must specify a non-empty FIELDSEEKER_SCHEMA_DIRECTORY")
|
||||
}
|
||||
FilesDirectoryLogo = os.Getenv("FILES_DIRECTORY_LOGO")
|
||||
if FilesDirectoryLogo == "" {
|
||||
return fmt.Errorf("You must specify a non-empty FILES_DIRECTORY_LOGO")
|
||||
}
|
||||
FilesDirectoryPublic = os.Getenv("FILES_DIRECTORY_PUBLIC")
|
||||
if FilesDirectoryPublic == "" {
|
||||
return fmt.Errorf("You must specify a non-empty FILES_DIRECTORY_PUBLIC")
|
||||
}
|
||||
FilesDirectoryUser = os.Getenv("FILES_DIRECTORY_USER")
|
||||
if FilesDirectoryUser == "" {
|
||||
return fmt.Errorf("You must specify a non-empty FILES_DIRECTORY_USER")
|
||||
FilesDirectory = os.Getenv("FILES_DIRECTORY")
|
||||
if FilesDirectory == "" {
|
||||
return fmt.Errorf("You must specify a non-empty FILES_DIRECTORY")
|
||||
}
|
||||
ForwardEmailReportAddress = os.Getenv("FORWARDEMAIL_REPORT_ADDRESS")
|
||||
if ForwardEmailReportAddress == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue