etcdctl/ctlv3/command/util.go
func defrag(c *v3.Client, ep string) {
	fmt.Printf("Defragmenting %q\n", ep)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	_, err := c.Defragment(ctx, ep)
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	fmt.Printf("Defragmented %q\n", ep)
}
func defrag(c *v3.Client, ep string) {
	fmt.Printf("Defragmenting %q\n", ep)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	_, err := c.Defragment(ctx, ep)
	cancel()
	if err != nil {
		ExitWithError(ExitError, err)
	}
	fmt.Printf("Defragmented %q\n", ep)
}
func defrag ( c * v3 . Client , ep string ) { fmt . Printf ( " \n " , ep ) ctx , cancel := context . WithTimeout ( context . Background ( ) , 30 * time . Second ) _ , err := c . Defragment ( ctx , ep ) cancel ( ) if err != nil { ExitWithError ( ExitError , err ) } fmt . Printf ( " \n " , ep ) }
// defrag a given endpoint
defrag a given endpoint