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 docker
import encoding.base64 import encoding.base64
import time import time
import json
import server
import env import env
import net.http import net.http
import cli
import git import git
import json
const container_build_dir = '/build' const container_build_dir = '/build'

View File

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

View File

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

View File

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

View File

@ -9,6 +9,7 @@ pub:
branch string [required] 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 { pub fn read_repos(path string) ?[]GitRepo {
if !os.exists(path) { if !os.exists(path) {
mut f := os.create(path) ? mut f := os.create(path) ?
@ -27,6 +28,7 @@ pub fn read_repos(path string) ?[]GitRepo {
return res return res
} }
// write_repos writes a list of repositories back to a given file
pub fn write_repos(path string, repos []GitRepo) ? { pub fn write_repos(path string, repos []GitRepo) ? {
mut f := os.create(path) ? mut f := os.create(path) ?

View File

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

View File

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

View File

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

View File

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