1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: array init: []string => []string{}

This commit is contained in:
Alexander Medvednikov
2020-04-26 09:17:13 +02:00
parent b898970031
commit 3ab8dc0092
30 changed files with 181 additions and 184 deletions

View File

@ -19,7 +19,7 @@ const (
fn C.symlink(charptr, charptr) int
fn init_os_args(argc int, argv &byteptr) []string {
mut args := []string
mut args := []string{}
//mut args := []string(make(0, argc, sizeof(string)))
//mut args := []string{len:argc}
for i in 0 .. argc {
@ -31,7 +31,7 @@ fn init_os_args(argc int, argv &byteptr) []string {
}
pub fn ls(path string) ?[]string {
mut res := []string
mut res := []string{}
dir := C.opendir(path.str)
if isnil(dir) {
return error('ls() couldnt open dir "$path"')