Documentation ¶
Index ¶
- func ExpectIdent(x syntax.Expr) (string, error)
- func ExpectLiteralString(x syntax.Expr) (string, error)
- func ExpectSingletonStringList(x syntax.Expr) (string, error)
- func ExpectTupleOfStrings(x syntax.Expr, length int) ([]string, error)
- func GetFunctionFromCall(call *syntax.CallExpr) string
- func ListArtifactsInDepsBzl(depsBzl string) (map[string]DownloadableArtifact, error)
- type DownloadableArtifact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectIdent ¶
ExpectIdent returns an identifier string or an error if this Expr is not an identifier.
func ExpectLiteralString ¶
ExpectLiteralString returns the string represented by this Expr or an error if the Expr is not a literal string.
func ExpectSingletonStringList ¶
ExpectSingletonStringList returns the string in this list or an error if this Expr is not a string list of length 1.
func ExpectTupleOfStrings ¶
ExpectTupleOfStrings returns the strings in the tuple represented by this Expr or an error if this is not a string tuple of the correct length.
func GetFunctionFromCall ¶
GetFunctionFromCall returns the name of the function called for the given call expression, or the empty string if the function being called is not a normal identifier.
func ListArtifactsInDepsBzl ¶
func ListArtifactsInDepsBzl(depsBzl string) (map[string]DownloadableArtifact, error)
ListArtifactsInDepsBzl parses the DEPS.bzl file and returns a map of repo name -> DownloadableArtifact capturing what's in that repo.
Types ¶
type DownloadableArtifact ¶
DownloadableArtifact represents a single URL/SHA256 pair.
func GetArtifactFromGoRepository ¶
func GetArtifactFromGoRepository(call *syntax.CallExpr) (DownloadableArtifact, error)
GetArtifactFromGoRepository returns the DownloadableArtifact pointed to by the given go_repository.
func GetArtifactFromHTTPArchive ¶
func GetArtifactFromHTTPArchive(call *syntax.CallExpr) (DownloadableArtifact, error)
GetArtifactFromHTTPArchive returns the DownloadableArtifact for a given http_archive() call.