Do not allow '*' character in namespace argument 21/7421/2
authorPetri Ovaska <petri.ovaska@nokia.com>
Fri, 17 Dec 2021 12:35:07 +0000 (14:35 +0200)
committerPetri Ovaska <petri.ovaska@nokia.com>
Fri, 17 Dec 2021 14:26:30 +0000 (16:26 +0200)
commit901ddd6506f295a0f78407e0ba9571fa559f1fc8
tree2c0cab1230ae783408bfcc6aeecbb94918533708
parent74b5e054dc40ed47cbbbb28f1fc7c80b50efcae6
Do not allow '*' character in namespace argument

Validate namespace argument in 'sdlcli get keys' -command.
The command gets an unexpected error when namespace argument
contains '*' asterisk character:

  sdlcli get keys '*' ...
  panic: runtime error: index out of range [1] with length 1

Issue-Id: RIC-113
Change-Id: Ie8b292c4c40801bf9fbfe65274f86485c7085865
Signed-off-by: Petri Ovaska <petri.ovaska@nokia.com>
internal/cli/keys.go
internal/cli/keys_test.go
internal/cli/types.go
internal/cli/types_test.go [new file with mode: 0644]