utils

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterTargets

func FilterTargets(inputs []string, allTargets []string, prefix string) []string

func FindTargetsFrom

func FindTargetsFrom(workdir, subdir string, mustContainFile string) (targets []string, err error)

FindTargetsFrom find all dir under {workdir}/{subdir}/ with 1 depth as target and then filter target if it does not contains {mustContainFile}

[example]:

workdir/
  |- cmd
      |- a - main.go
      |- b - main.go
      |- c - xxx.go

call findTargetsFrom(workdir, "cmd", "main.go") -> result: ["cmd/a", "cmd/b"]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL