1
Fork 0
mirror of https://github.com/RGBCube/color.v synced 2025-07-31 09:57:47 +00:00

Add error samples

This commit is contained in:
RGBCube 2022-11-18 19:45:34 +03:00
parent 992c9da2e9
commit 304a1d558a
2 changed files with 21 additions and 0 deletions

8
builder_error1.v Normal file
View file

@ -0,0 +1,8 @@
module main
import color
fn main() {
println(color.red.apply('Hello World'))
println(color.bold.apply('Hello World'))
}

13
builder_error2.v Normal file
View file

@ -0,0 +1,13 @@
module main
import color
fn main() {
p := color.PaintBrush{
fg: color.rgb(0, 0, 0)!,
bg: color.hex(0xffffff)!,
styles: [color.bold, color.underline, color.italic]
}
print(p.apply('Hello World'))
}