forked from vieter-v/vieter
refactor(util): split into two files
This commit is contained in:
parent
1d3c7a1651
commit
055b168ff1
7 changed files with 114 additions and 107 deletions
13
src/env/env.v
vendored
13
src/env/env.v
vendored
|
|
@ -3,12 +3,13 @@ module env
|
|||
import os
|
||||
import toml
|
||||
|
||||
// The prefix that every environment variable should have
|
||||
const prefix = 'VIETER_'
|
||||
|
||||
// The suffix an environment variable in order for it to be loaded from a file
|
||||
// instead
|
||||
const file_suffix = '_FILE'
|
||||
const (
|
||||
// The prefix that every environment variable should have
|
||||
prefix = 'VIETER_'
|
||||
// The suffix an environment variable in order for it to be loaded from a file
|
||||
// instead
|
||||
file_suffix = '_FILE'
|
||||
)
|
||||
|
||||
fn get_env_var(field_name string) ?string {
|
||||
env_var_name := '$env.prefix$field_name.to_upper()'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue