Skip to content

Commit c3fbafe

Browse files
committed
extract src/main.v for clarity
1 parent 684bdf3 commit c3fbafe

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ avatars/
2020
.DS_Store
2121

2222
*~
23+
gitly.exe

src/gitly.v

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,9 @@ mut:
4444

4545
fn C.sqlite3_config(int)
4646

47-
fn main() {
47+
fn new_app() !&App {
4848
C.sqlite3_config(3)
4949

50-
if os.args.contains('ci_run') {
51-
return
52-
}
53-
54-
vweb.run(new_app()!, http_port)
55-
}
56-
57-
fn new_app() !&App {
5850
mut app := &App{
5951
db: sqlite.connect('gitly.sqlite') or { panic(err) }
6052
started_at: time.now().unix

src/main.v

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import os
2+
import vweb
3+
4+
fn main() {
5+
if os.args.contains('ci_run') {
6+
return
7+
}
8+
vweb.run(new_app()!, http_port)
9+
}

0 commit comments

Comments
 (0)