mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
ci: run VAUTOFIX=1 ./v check-md -hide-warnings .
to fix doc failures
This commit is contained in:
parent
c963dc619e
commit
5e37798560
6 changed files with 27 additions and 41 deletions
18
doc/docs.md
18
doc/docs.md
|
@ -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{
|
||||
const numbers = [1, 2, 3]
|
||||
const red = Color{
|
||||
r: 255
|
||||
g: 0
|
||||
b: 0
|
||||
}
|
||||
// evaluate function call at compile time*
|
||||
blue = rgb(0, 0, 255)
|
||||
)
|
||||
}
|
||||
// evaluate function call at compile time*
|
||||
const blue = rgb(0, 0, 255)
|
||||
|
||||
println(numbers)
|
||||
println(red)
|
||||
|
|
|
@ -115,9 +115,7 @@ module main
|
|||
import vweb
|
||||
import os
|
||||
|
||||
const (
|
||||
http_port = 3001
|
||||
)
|
||||
const http_port = 3001
|
||||
|
||||
struct App {
|
||||
vweb.Context
|
||||
|
|
|
@ -117,9 +117,7 @@ module main
|
|||
import vweb
|
||||
import os
|
||||
|
||||
const (
|
||||
http_port = 3001
|
||||
)
|
||||
const http_port = 3001
|
||||
|
||||
struct App {
|
||||
vweb.Context
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 = [
|
||||
const win_width = 600
|
||||
const win_height = 700
|
||||
const bg_color = gx.white
|
||||
const font_paths = [
|
||||
'arial.ttf',
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
struct App_data {
|
||||
pub mut:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue