Module os.cmdline stdlib

os.cmdline
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
0
Imported by:
2
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

This section is empty.

Imported by

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn only_non_options

fn only_non_options(args []string) []string

Fetch all options not start with '-', e.g.

args: ['-d', 'aa', '--help', 'bb'] ret: ['aa', 'bb']

#fn only_options

fn only_options(args []string) []string

Fetch all options start with '-', e.g.

args: ['-d', 'aa', '--help', 'bb'] ret: ['-d', '--help']

#fn option

fn option(args []string, param string, def string) string

Fetch option by param, e.g.

args: ['v', '-d', 'aa'] param: '-d' def: '' ret: 'aa'

#fn options

fn options(args []string, param string) []string

Fetch multiple option by param, e.g.

args: ['v', '-d', 'aa', '-d', 'bb', '-d', 'cc'] param: '-d' ret: ['aa', 'bb', 'cc']

#fn options_after

fn options_after(args []string, what []string) []string

Fetch all options after what params, e.g.

args: ['-stat', 'test', 'aaa.v'] what: ['test'] ret: ['aaa.v']

#fn options_before

fn options_before(args []string, what []string) []string

Fetch all options before what params, e.g.

args: ['-stat', 'test', 'aaa.v'] what: ['test'] ret: ['-stat']

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.