Pluralize getPipelineResp
This commit is contained in:
@@ -114,15 +114,15 @@ func (d pipelineListItemDelegate) Render(w io.Writer, m list.Model, index int, l
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createPipelineWidgetList(client graphql.Client) (tea.Model, error) {
|
func createPipelineWidgetList(client graphql.Client) (tea.Model, error) {
|
||||||
getPipelineResp, err := queries.GetPipelines(context.Background(), client)
|
getPipelinesResp, err := queries.GetPipelines(context.Background(), client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return pipelineWidget{}, fmt.Errorf("Could not connect to server: %w", err)
|
return pipelineWidget{}, fmt.Errorf("Could not connect to server: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var content []list.Item
|
var content []list.Item
|
||||||
|
|
||||||
if getPipelineResp.Pipelines != nil {
|
if getPipelinesResp.Pipelines != nil {
|
||||||
for _, pipeline := range getPipelineResp.Pipelines {
|
for _, pipeline := range getPipelinesResp.Pipelines {
|
||||||
if pipeline != nil {
|
if pipeline != nil {
|
||||||
content = append(content, pipelineListItem{
|
content = append(content, pipelineListItem{
|
||||||
name: pipeline.Name,
|
name: pipeline.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user