In the project logs command, the flags --page, --page-size, --query, --sort are defined and and also are accepted as input from the user.
flags := cmd.Flags()
flags.Int64VarP(&opts.Page, "page", "", 1, "Page number")
flags.Int64VarP(&opts.PageSize, "page-size", "", 10, "Size of per page")
flags.StringVarP(&opts.Q, "query", "q", "", "Query string to query resources")
flags.StringVarP(&opts.Sort, "sort", "", "", "Sort the resource list in ascending or descending order")
The struct var opts api.ListFlags in which they are stored is not passed to api.LosProject() ,
resp, err = api.LogsProject(projectName)
only the projectName is passed
Also in the project_handler.go, it only handles logic of accepting only projectName
func LogsProject(projectName string) (*project.GetLogExtsOK, error) {
ctx, client, err := utils.ContextWithClient()
if err != nil {
return nil, err
}
response, err := client.Project.GetLogExts(ctx, &project.GetLogExtsParams{
ProjectName: projectName,
Context: ctx,
})
if err != nil {
return nil, err
}
return response, nil
}
I am working on this issue.
In the
project logscommand, the flags--page,--page-size,--query,--sortare defined and and also are accepted as input from the user.The struct
var opts api.ListFlagsin which they are stored is not passed toapi.LosProject(),resp, err = api.LogsProject(projectName)only the projectName is passed
Also in the
project_handler.go, it only handles logic of accepting onlyprojectNameI am working on this issue.