refactor: some small changes before PR

This commit is contained in:
Jef Roosens 2022-12-19 11:58:35 +01:00
parent b66d1161ed
commit ab81eebd87
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
7 changed files with 31 additions and 34 deletions

View file

@ -1,6 +1,7 @@
module models
import time
import os
pub struct BuildLog {
pub mut:
@ -28,6 +29,13 @@ pub fn (bl &BuildLog) str() string {
return str
}
// path returns the path to the log file, relative to the logs directory
pub fn (bl &BuildLog) path() string {
filename := bl.start_time.custom_format('YYYY-MM-DD_HH-mm-ss')
return os.join_path(bl.target_id.str(), bl.arch, filename)
}
[params]
pub struct BuildLogFilter {
pub mut: