22
33import com .francescodisalesdev .gitcli .utility .ErrorMessages ;
44import com .francescodisalesdev .gitcli .utility .SystemMessages ;
5+
56import org .json .simple .parser .ParseException ;
6- import org . springframework . boot . autoconfigure . info . ProjectInfoProperties ;
7+
78import org .springframework .shell .standard .ShellComponent ;
89import org .springframework .shell .standard .ShellMethod ;
9- import com .francescodisalesdev .gitcli .service .GitService ;
1010import org .springframework .shell .standard .ShellOption ;
1111
12+ import com .francescodisalesdev .gitcli .service .GitService ;
13+
14+
1215import java .io .IOException ;
16+
1317import java .util .Iterator ;
1418import java .util .List ;
1519import java .util .Set ;
@@ -167,7 +171,7 @@ public void searchUser(String username,@ShellOption(defaultValue = "1") int page
167171 Set <String > usersResult = gitService .searchUserService (username ,page );
168172
169173 if (usersResult == null )
170- System .out .println (ErrorMessages .USER_NOT_FOUND );
174+ System .out .println (ErrorMessages .USER_NOT_FOUND . toString () );
171175 else
172176 {
173177 Iterator iterator = usersResult .iterator ();
@@ -178,7 +182,7 @@ public void searchUser(String username,@ShellOption(defaultValue = "1") int page
178182
179183 int pages = gitService .getUserPages (username );
180184 if (pages > 1 )
181- System .out .println ("total pages " +pages );
185+ System .out .println (SystemMessages . TOTAL_PAGES . toString () +pages );
182186
183187 }
184188 catch (IOException | ParseException e )
@@ -189,4 +193,10 @@ public void searchUser(String username,@ShellOption(defaultValue = "1") int page
189193
190194 }
191195
196+ @ ShellMethod ("gets information about a user" )
197+ public void infoUser (String user )
198+ {
199+ GitService gitService = new GitService ();
200+ }
201+
192202}
0 commit comments