github.com/sercand/please@v13.4.0+incompatible/src/query/alltargets.go (about)

     1  package query
     2  
     3  import (
     4  	"fmt"
     5  	"strings"
     6  
     7  	"github.com/thought-machine/please/src/core"
     8  )
     9  
    10  // AllTargets simply prints all the targets according to some expression.
    11  func AllTargets(graph *core.BuildGraph, labels core.BuildLabels, showHidden bool) {
    12  	for _, label := range labels {
    13  		if showHidden || !strings.HasPrefix(label.Name, "_") {
    14  			fmt.Printf("%s\n", label)
    15  		}
    16  	}
    17  }