1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib
lutherwenxu dadf147382 flag: implement *_opt() and *_multi()
It's very often that someone will need to process values that were not
provided separately (eg. generating a complex default value like in V).

This commit allows the user to call the *_opt() functions instead of
forcing them to provide some magical default values.

* flag: Implement int_multi(), float_multi() and string_multi()

These 3 functions are useful when the application expects a flag to be
repeated more than once.

A sample would be:
v -cflags someflag -cflags secondflag

This feature exposes the raw array that the flag parser internally keeps
and allow the application to parse it however they want instead of
dropping everything except the first element.

* flag: Add documentation

Add comments describing what *_opt() and *_multi() do.
2019-12-16 19:03:38 +03:00
..
arrays arrays: fix range 2019-10-30 17:30:49 +03:00
benchmark check unused and unmodified vars in all modules, not just main 2019-12-06 18:43:56 +03:00
bignum bignum module wrapper for kokke/tiny-bignum-c 2019-11-07 22:04:18 +03:00
bitfield vlib: fix missing else{} in match statements 2019-12-07 17:23:37 +03:00
builtin update malloc 2019-12-14 02:46:55 +03:00
cli cli: update mutability 2019-12-06 19:12:01 +03:00
clipboard fix clipboard_linux.v 2019-12-07 18:16:19 +03:00
compiler cc.v: build thirdparty objfiles with msvc when no cc installed 2019-12-16 18:56:37 +03:00
crypto strings: builder: write_b() 2019-12-06 23:02:09 +03:00
darwin allow # in webview module 2019-12-02 12:31:49 +03:00
encoding fix csv/writer.v 2019-12-13 20:45:48 +03:00
eventbus *char => charptr everywhere 2019-12-01 10:33:26 +03:00
filepath compiler: support storing temporary files under TMPDIR/v/ 2019-11-17 06:45:20 +03:00
flag flag: implement *_opt() and *_multi() 2019-12-16 19:03:38 +03:00
freetype simplify cflag parsing 2019-12-15 06:18:14 +03:00
gg remove os/time references from live programs, fix warnings 2019-12-09 18:53:17 +03:00
gl check unused and unmodified vars in all modules, not just main 2019-12-06 18:43:56 +03:00
glfw examples: empty gg/freetype project 2019-11-20 07:26:52 +03:00
glm compiler: force custom struct .str() methods to be defined public 2019-12-11 03:24:26 +03:00
gx fix a string interpolation bug 2019-12-03 20:41:49 +03:00
hash check unused and unmodified vars in all modules, not just main 2019-12-06 18:43:56 +03:00
http simplify cflag parsing 2019-12-15 06:18:14 +03:00
json vlib: fix missing else{} in match statements 2019-12-07 17:23:37 +03:00
log access modifiers: update tests/examples 2019-12-13 20:09:11 +03:00
math math: fix abs (-0.0) 2019-12-15 19:37:17 +03:00
mysql mysql: add mysql.escape_string() 2019-12-13 19:12:42 +03:00
net access modifiers: update tests/examples 2019-12-13 20:09:11 +03:00
orm orm_test: remove pg import for now 2019-08-18 15:02:36 +03:00
os string: last_index ?int 2019-12-12 21:54:48 +03:00
os2 cc: bring back os.rm() 2019-10-09 07:02:45 +03:00
pg ORM fixes 2019-12-06 02:00:37 +03:00
rand remove unnecessary casts everywhere 2019-12-07 15:51:00 +03:00
readline fix clipboard_linux.v 2019-12-07 18:16:19 +03:00
runtime compiler: add support for $if x32, x64, big_endian, little_endian 2019-11-15 16:14:28 +03:00
sdl cleanup SDL event system 2019-12-14 03:31:07 +03:00
sqlite simplify cflag parsing 2019-12-15 06:18:14 +03:00
stbi force C function definitions 2019-11-24 12:14:22 +03:00
strconv atoi: fix leading zeros in string to int conversion 2019-12-08 23:22:33 +03:00
strings builder_js: fix mutable error 2019-12-16 18:54:44 +03:00
sync more mutability fixes 2019-12-06 19:23:24 +03:00
szip szip: use &zip instead of *zip (#2301) 2019-10-12 12:46:33 +03:00
term make V work on Windows 7 2019-11-06 23:04:40 +03:00
time remove unnecessary casts everywhere 2019-12-07 15:51:00 +03:00
ui ui/examples: users: fix button click 2019-12-12 23:42:51 +03:00
vweb tutorial: minor fixes 2019-12-14 18:59:02 +03:00