Skip to content

Commit 81b25a5

Browse files
♻️ Refactored to add help for sub-commands.
Updated version number.
1 parent 97ec143 commit 81b25a5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/main/java/org/rrajesh1979/tool/JWTC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @since 2021-Jan-08
3232
*/
3333

34-
@Command(name = "jwtc", mixinStandardHelpOptions = true, version = "jwtc 0.0.1", description = "Encode and decode JWT tokens.", subcommands = {
34+
@Command(name = "jwtc", mixinStandardHelpOptions = true, version = "jwtc 0.0.5", description = "Encode and decode JWT tokens.", subcommands = {
3535
HelpCommand.class, JWTCEncode.class, JWTCDecode.class
3636
})
3737
@Slf4j

src/main/java/org/rrajesh1979/tool/JWTCDecode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
import org.rrajesh1979.utils.JWTUtil;
2121

2222
import lombok.extern.slf4j.Slf4j;
23+
import picocli.CommandLine;
2324
import picocli.CommandLine.Command;
2425
import picocli.CommandLine.Option;
2526

26-
@Command(name = "decode", description = "Decode JWT token")
27+
@Command(name = "decode", description = "Decode JWT token", subcommands = CommandLine.HelpCommand.class)
2728
@Slf4j
2829
public class JWTCDecode implements Runnable {
2930
@Option(names = { "-j", "--jwt" }, description = "JWT String to be decoded.", required = true)

src/main/java/org/rrajesh1979/tool/JWTCEncode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121

2222
import lombok.extern.slf4j.Slf4j;
2323
import picocli.CommandLine.Command;
24+
import picocli.CommandLine.HelpCommand;
2425
import picocli.CommandLine.Option;
2526

26-
@Command(name = "encode", description = "Encodes a JWT token")
27+
@Command(name = "encode", description = "Encodes a JWT token", subcommands = HelpCommand.class)
2728
@Slf4j
2829
public class JWTCEncode implements Runnable {
2930
@Option(names = { "-a",

0 commit comments

Comments
 (0)