<commit_before>package main

import (
	"fmt"
	_ "github.com/Symantec/Dominator/proto/imageserver"
	"net/rpc"
	"os"
)

func deleteImageSubcommand(client *rpc.Client, args []string) {
	err := deleteImage(client, args[0])
	if err != nil {
		fmt.Printf("Error deleting image\t%s\n", err)
		os.Exit(1)
	}
	os.Exit(0)
}

func deleteImage(client *rpc.Client, name string) error {
	return nil
}<commit_msg>Implement imagetool.deleteImage().<commit_after>package main

import (
	"errors"
	"fmt"
	"github.com/Symantec/Dominator/proto/imageserver"
	"net/rpc"
	"os"
)

func deleteImageSubcommand(client *rpc.Client, args []string) {
	err := deleteImage(client, args[0])
	if err != nil {
		fmt.Printf("Error deleting image\t%s\n", err)
		os.Exit(1)
	}
	os.Exit(0)
}

func deleteImage(client *rpc.Client, name string) error {
	var request imageserver.DeleteRequest
	request.ImageName = name
	var reply imageserver.DeleteResponse
	err := client.Call("Imageserver.DeleteImage", request, &reply)
	if err != nil {
		return err
	}
	if reply.Success {
		return nil
	}
	return errors.New(reply.ErrorString)
}
{'fraction_non_alphanumeric': 0.14167433302667892, 'fraction_numerical': 0.005519779208831647, 'mean_word_length': 4.579487179487179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5690010', 'n_tokens_mistral': 414, 'n_tokens_neox': 404, 'n_words': 87}