ci: run VAUTOFIX=1 ./v check-md -hide-warnings . to fix doc failures

This commit is contained in:
Delyan Angelov 2023-11-25 09:34:46 +02:00
parent c963dc619e
commit 5e37798560
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
6 changed files with 27 additions and 41 deletions

View file

@ -2926,10 +2926,8 @@ To dereference a reference, use the `*` operator, just like in C.
## Constants
```v
const (
pi = 3.14
world = '世界'
)
const pi = 3.14
const world = '世界'
println(pi)
println(world)
@ -2961,16 +2959,14 @@ fn rgb(r int, g int, b int) Color {
}
}
const (
numbers = [1, 2, 3]
red = Color{
r: 255
g: 0
b: 0
}
// evaluate function call at compile time*
blue = rgb(0, 0, 255)
)
const numbers = [1, 2, 3]
const red = Color{
r: 255
g: 0
b: 0
}
// evaluate function call at compile time*
const blue = rgb(0, 0, 255)
println(numbers)
println(red)

View file

@ -115,9 +115,7 @@ module main
import vweb
import os
const (
http_port = 3001
)
const http_port = 3001
struct App {
vweb.Context

View file

@ -117,9 +117,7 @@ module main
import vweb
import os
const (
http_port = 3001
)
const http_port = 3001
struct App {
vweb.Context

View file

@ -63,9 +63,7 @@ module main
import eventbus
// initialize it globally
const (
eb = eventbus.new[string]()
)
const eb = eventbus.new[string]()
fn main() {
// get a mutable reference to the subscriber

View file

@ -16,10 +16,8 @@ import time
import math
import sokol.audio
const (
sw = time.new_stopwatch()
sw_start_ms = sw.elapsed().milliseconds()
)
const sw = time.new_stopwatch()
const sw_start_ms = sw.elapsed().milliseconds()
@[inline]
fn sintone(periods int, frame int, num_frames int) f32 {

View file

@ -247,14 +247,12 @@ import sokol.gfx
import x.ttf
import os
const (
win_width = 600
win_height = 700
bg_color = gx.white
font_paths = [
'arial.ttf',
]
)
const win_width = 600
const win_height = 700
const bg_color = gx.white
const font_paths = [
'arial.ttf',
]
struct App_data {
pub mut: