CLI client for Syncthing in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

folder.go 433B

123456789101112131415161718192021
  1. package commands
  2. import (
  3. "fmt"
  4. "git.dtluna.net/dtluna/syncthing-cli/api"
  5. "git.dtluna.net/dtluna/syncthing-cli/config"
  6. "git.dtluna.net/dtluna/syncthing-cli/format"
  7. "github.com/hashicorp/errwrap"
  8. )
  9. func FolderList(cfg *config.Config) error {
  10. stconfig, err := api.GetConfig(cfg)
  11. if err != nil {
  12. return errwrap.Wrapf("getting config: {{err}}", err)
  13. }
  14. fmt.Println(format.IndentFolders(stconfig.Folders, 2))
  15. return nil
  16. }