Exemplo n.º 1
0
def hello(
        *, name: tx.Annotated[str,
                              Description("greeting target name")]) -> None:
    """hello message"""
    from egoist.generators.clikit import runtime, clikit

    with runtime.generate(clikit):
        runtime.printf("hello %s\n", name)
Exemplo n.º 2
0
def hello(*, name: str = "foo") -> None:
    """hello message"""
    from egoist.generators.clikit import runtime, clikit

    options = runtime.get_cli_options()
    options.name.help = "name of person"

    with runtime.generate(clikit):
        runtime.printf("hello %s\n", name)
Exemplo n.º 3
0
def hello(*, name: str) -> None:
    """hello message"""
    from egoist.generators.clikit import runtime, clikit

    with runtime.generate(clikit) as m:
        args = runtime.get_cli_rest_args()
        target = m.symbol("target")
        with m.for_(f"_, {target} := range {args}"):
            runtime.printf("%s: hello %s\n", name, target)
Exemplo n.º 4
0
def hello(*,
          name: str = "world",
          age: types.uint,
          debug: types.bool,
          dur: types.duration) -> None:
    """hello message"""
    from egoist.generators.clikit import runtime, clikit

    with runtime.generate(clikit):
        runtime.printf("hello %s(%d)\n", name, age)
Exemplo n.º 5
0
def hello(*, name: str) -> None:
    """hello message"""
    from egoist.generators.clikit import runtime, clikit

    with runtime.generate(clikit):
        runtime.printf("hello %s\n", name)
Exemplo n.º 6
0
def hello(*, name: str) -> None:
    """hello message"""
    with runtime.generate(clikit):
        runtime.printf("hello %s\n", name)
Exemplo n.º 7
0
def byebye(*, name: str) -> None:
    """byebye message"""
    from egoist.generators.clikit import runtime, clikit

    with runtime.generate(clikit):
        runtime.printf("byebye %s\n", name)