Files
spring-boot/spring-bootstrap-cli/src/test/resources/commands/test.groovy
Dave Syer bf30e2de90 [bs-135] Add support for closure-style options declarations
E.g.

    options {
	option "foo", "Foo set"
	option "bar", "Bar has an argument of type int"
          withOptionalArg() ofType Integer
    }

    println "Hello ${options.nonOptionArguments()}: " +
      "${options.has('foo')} ${options.valueOf('bar')}"

[#50427095] [bs-135] Plugin model for spring commands
2013-05-28 17:03:01 +01:00

8 lines
294 B
Groovy

options {
option "foo", "Foo set"
option "bar", "Bar has an argument of type int" withOptionalArg() ofType Integer
}
org.springframework.bootstrap.cli.command.ScriptCommandTests.executed = true
println "Hello ${options.nonOptionArguments()}: ${options.has('foo')} ${options.valueOf('bar')}"