fmt: v fmt

main
zztkm 1 year ago
parent 25ecba3fbb
commit 2c82da969e

@ -166,7 +166,7 @@ fn build(config config.Config, mut logger log.Log) ! {
logger.info('start md to html')
for path in mds {
if b.is_ignore(path) {
logger.info('$path is included in ignore_files, skip build')
logger.info('${path} is included in ignore_files, skip build')
continue
}
b.md2html(path)!

@ -96,7 +96,7 @@ fn watch(path string, config config.Config, mut logger log.Log) {
}
now := os.file_last_mod_unix(w.path)
if now > w.time_stamp {
println('modified file: $w.path')
println('modified file: ${w.path}')
w.time_stamp = now
build(config, mut logger) or {
@ -117,7 +117,7 @@ fn serve(mut logger log.Log) ! {
port: commands.cport
}
local_base_url := 'http://localhost:$commands.cport/'
local_base_url := 'http://localhost:${commands.cport}/'
mut config := load_config(default_config)!
config.base_url = local_base_url
println(local_base_url)
@ -128,7 +128,7 @@ fn serve(mut logger log.Log) ! {
println('Build failed')
}
w := go watch('.', config, mut logger)
w := spawn watch('.', config, mut logger)
server.listen_and_serve()
w.wait()

@ -24,8 +24,8 @@ pub mut:
pub fn load(toml_text string) !Config {
doc := toml.parse_text(toml_text)!
mut config := doc.reflect<Config>()
config.build = doc.value('build').reflect<Build>()
mut config := doc.reflect[Config]()
config.build = doc.value('build').reflect[Build]()
return config
}

Loading…
Cancel
Save