github.com/cloud-foundations/dominator@v0.0.0-20221004181915-6e4fee580046/cmd/imagetool/chownDirectory.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/Cloud-Foundations/Dominator/imageserver/client"
     7  	"github.com/Cloud-Foundations/Dominator/lib/log"
     8  )
     9  
    10  func chownDirectorySubcommand(args []string, logger log.DebugLogger) error {
    11  	imageSClient, _ := getClients()
    12  	if err := client.ChownDirectory(imageSClient, args[0],
    13  		args[1]); err != nil {
    14  		return fmt.Errorf("Error changing directory ownership: %s", err)
    15  	}
    16  	return nil
    17  }