You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/18 13:27:40 UTC

[GitHub] [skywalking-cli] kezhenxu94 commented on pull request #82: chore: reorganize the project layout and add an example of .skywalking.yaml

kezhenxu94 commented on pull request #82:
URL: https://github.com/apache/skywalking-cli/pull/82#issuecomment-748083977


   > Noted. Actually, SWCK needs functions in `pkg` with an error return value, instead of exiting the process when facing some errors as below
   > 
   > ```
   > func AllServices(cliCtx *cli.Context, duration api.Duration) ([]api.Service, error)
   > ```
   > 
   > Do you have any convenient path to support it?
   > The only downside of the current solution is SWCK has to copy the implementation of these functions, which brings some issues if the details of them are updated.
   
   I see, we have this 
   
   https://github.com/apache/skywalking-cli/blob/2ed3443179b3995f44d5588c66716fe24b6f0341/pkg/graphql/client/client.go#L39
   
   and this
   
   https://github.com/apache/skywalking-cli/blob/2ed3443179b3995f44d5588c66716fe24b6f0341/pkg/graphql/client/client.go#L57
   
   the current query (`AllServices`, etc.) calls the latter one, so I think we can call the former one and let the `command` package to `panic` when there is an error, this should meet your requirement right? @hanahmily 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org