refactor(util): split into two files

This commit is contained in:
Jef Roosens 2022-05-16 14:22:53 +02:00
parent 1d3c7a1651
commit 055b168ff1
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 114 additions and 107 deletions

13
src/env/env.v vendored
View file

@ -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()'