4 ms·
Apache Groovy also has "undocumented features", e.g. from your scripts: matchingSecret = secrets.find { secret -> secret.id == id } can be written as: ma
by vorg 10y ago
Apache Groovy also has "undocumented features", e.g. from your scripts:
matchingSecret = secrets.find { secret -> secret.id == id }
can be written as:
matchingSecret = secrets.find { it.id == id }
Those scripts look fairly basic, without any looping. Perhaps Java 8 with lambdas, or Kotlin could be used instead.
- dmux 10y agoFor more about this, see the documentation relating to the "implicit parameter"[0] [0] http://groovy-lang.org/closures.html#implicit-it http://groovy-lang.org/closures.html#implicit-it