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:
parent
992c9da2e9
commit
304a1d558a
2 changed files with 21 additions and 0 deletions
8
builder_error1.v
Normal file
8
builder_error1.v
Normal 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
13
builder_error2.v
Normal 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'))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue