-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
via #64
Basic feature
volt list -f
can access and show information of lock.json structure.
Example
Show all repositories:
$ volt list -f '{{ range .Repos }}{{ println .Path }}{{ end }}'
Show repositories used by current profile:
$ volt list -f '{{ range .Profiles }}{{ if eq $.CurrentProfileName .Name }}{{ range .ReposPath }}{{ println . }}{{ end }}{{ end }}{{ end }}'
Functions
Some useful functions are defined by volt.
currentProfile (profile)
This accesses to current profile.
So above code (Show repositories used by current profile
) can be written like this:
$ volt list -f '{{ range currentProfile.ReposPath }}{{ println . }}{{ end }}'
profile name (profile)
Returns given name's profile.
json value [prefix [indent]] (string)
Returns JSON representation of value.
The arguments are same as json.MarshalIndent()
.
version (string)
format: "v{major}.{minor}.{patch}"
versionMajor (number)
versionMinor (number)
versionPatch (number)
major/minor/patch version number