Made vet happy

main^2
Jef Roosens 2022-04-06 17:57:05 +02:00
parent e9d7858380
commit 75dfc5267b
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
9 changed files with 6 additions and 11 deletions

View File

@ -3,12 +3,10 @@ module build
import docker
import encoding.base64
import time
import json
import server
import env
import net.http
import cli
import git
import json
const container_build_dir = '/build'

View File

@ -3,6 +3,7 @@ module build
import cli
import env
// cmd returns the cli submodule that handles the build process
pub fn cmd() cli.Command {
return cli.Command{
name: 'build'

View File

@ -100,6 +100,3 @@ pub fn load<T>(path string) ?T {
}
return res
}
pub fn load_with_file<T>(path string) ?T {
}

View File

@ -9,6 +9,7 @@ struct Config {
api_key string [required]
}
// cmd returns the cli submodule that handles the repos API interaction
pub fn cmd() cli.Command {
return cli.Command{
name: 'repos'

View File

@ -9,6 +9,7 @@ pub:
branch string [required]
}
// read_repos reads the given JSON file & parses it as a list of Git repos
pub fn read_repos(path string) ?[]GitRepo {
if !os.exists(path) {
mut f := os.create(path) ?
@ -27,6 +28,7 @@ pub fn read_repos(path string) ?[]GitRepo {
return res
}
// write_repos writes a list of repositories back to a given file
pub fn write_repos(path string, repos []GitRepo) ? {
mut f := os.create(path) ?

View File

@ -2,9 +2,7 @@ module main
import os
import server
import util
import cli
import env
import build
import git

View File

@ -3,6 +3,7 @@ module server
import cli
import env
// cmd returns the cli submodule that handles starting the server
pub fn cmd() cli.Command {
return cli.Command{
name: 'server'

View File

@ -1,8 +1,6 @@
module server
import web
import os
import json
import git
const repos_file = 'repos.json'

View File

@ -6,7 +6,6 @@ import log
import repo
import env
import util
import cli
const port = 8000