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
14
doc/docs.md
14
doc/docs.md
|
@ -2926,10 +2926,8 @@ To dereference a reference, use the `*` operator, just like in C.
|
||||||
## Constants
|
## Constants
|
||||||
|
|
||||||
```v
|
```v
|
||||||
const (
|
const pi = 3.14
|
||||||
pi = 3.14
|
const world = '世界'
|
||||||
world = '世界'
|
|
||||||
)
|
|
||||||
|
|
||||||
println(pi)
|
println(pi)
|
||||||
println(world)
|
println(world)
|
||||||
|
@ -2961,16 +2959,14 @@ fn rgb(r int, g int, b int) Color {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const numbers = [1, 2, 3]
|
||||||
numbers = [1, 2, 3]
|
const red = Color{
|
||||||
red = Color{
|
|
||||||
r: 255
|
r: 255
|
||||||
g: 0
|
g: 0
|
||||||
b: 0
|
b: 0
|
||||||
}
|
}
|
||||||
// evaluate function call at compile time*
|
// evaluate function call at compile time*
|
||||||
blue = rgb(0, 0, 255)
|
const blue = rgb(0, 0, 255)
|
||||||
)
|
|
||||||
|
|
||||||
println(numbers)
|
println(numbers)
|
||||||
println(red)
|
println(red)
|
||||||
|
|
|
@ -115,9 +115,7 @@ module main
|
||||||
import vweb
|
import vweb
|
||||||
import os
|
import os
|
||||||
|
|
||||||
const (
|
const http_port = 3001
|
||||||
http_port = 3001
|
|
||||||
)
|
|
||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
vweb.Context
|
vweb.Context
|
||||||
|
|
|
@ -117,9 +117,7 @@ module main
|
||||||
import vweb
|
import vweb
|
||||||
import os
|
import os
|
||||||
|
|
||||||
const (
|
const http_port = 3001
|
||||||
http_port = 3001
|
|
||||||
)
|
|
||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
vweb.Context
|
vweb.Context
|
||||||
|
|
|
@ -63,9 +63,7 @@ module main
|
||||||
import eventbus
|
import eventbus
|
||||||
|
|
||||||
// initialize it globally
|
// initialize it globally
|
||||||
const (
|
const eb = eventbus.new[string]()
|
||||||
eb = eventbus.new[string]()
|
|
||||||
)
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// get a mutable reference to the subscriber
|
// get a mutable reference to the subscriber
|
||||||
|
|
|
@ -16,10 +16,8 @@ import time
|
||||||
import math
|
import math
|
||||||
import sokol.audio
|
import sokol.audio
|
||||||
|
|
||||||
const (
|
const sw = time.new_stopwatch()
|
||||||
sw = time.new_stopwatch()
|
const sw_start_ms = sw.elapsed().milliseconds()
|
||||||
sw_start_ms = sw.elapsed().milliseconds()
|
|
||||||
)
|
|
||||||
|
|
||||||
@[inline]
|
@[inline]
|
||||||
fn sintone(periods int, frame int, num_frames int) f32 {
|
fn sintone(periods int, frame int, num_frames int) f32 {
|
||||||
|
|
|
@ -247,14 +247,12 @@ import sokol.gfx
|
||||||
import x.ttf
|
import x.ttf
|
||||||
import os
|
import os
|
||||||
|
|
||||||
const (
|
const win_width = 600
|
||||||
win_width = 600
|
const win_height = 700
|
||||||
win_height = 700
|
const bg_color = gx.white
|
||||||
bg_color = gx.white
|
const font_paths = [
|
||||||
font_paths = [
|
|
||||||
'arial.ttf',
|
'arial.ttf',
|
||||||
]
|
]
|
||||||
)
|
|
||||||
|
|
||||||
struct App_data {
|
struct App_data {
|
||||||
pub mut:
|
pub mut:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue