func DeleteZeroLengthFiles(dir string) {
	command := "find"
	var args []string
	args = append(args, dir, "-size", "0c", "-delete")
	out, err := exec.Command(command, args...).Output()
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
	} else {
		fmt.Printf(string(out))
	}
}
DeleteZeroLengthFiles  deletes zero length files from a specified dir
package sshot
import (
	"bytes"
	"fmt"
	"os"
	"os/exec"
	"regexp"
	"strings"
)
type Parameters struct {
	Command   string  
	Sizes     string  
	Crop      string  
	Scale     string  
	Timeout   string  
	Filename  string  
	UserAgent string  
}
func GetShots(urls []string, params Parameters) {
	success := false
	for success == false {
		badURL := runShotClient(urls, params)
		if badURL == "" {
			success = true
		} else {
			urls = deleteStringFromSlice(badURL, urls)
		}
	}
}
func runShotClient(urls []string, params Parameters) string {
	var args []string
	command := params.Command
	args = append(
		urls,
		params.Sizes,
		params.Crop,
		params.Scale,
		params.Timeout,
		params.Filename,
	)
	cmd := exec.Command(command, args...)
	var out bytes.Buffer
	var stderr bytes.Buffer
	cmd.Stdout = &out
	cmd.Stderr = &stderr
	err := cmd.Run()
	if err != nil {
		fmt.Println(fmt.Sprint(err) + ": " + stderr.String())
		if strings.Contains(stderr.String(), "Couldn't load url") {
			return getBadURLFromErr(stderr.String())
		}
	}
	return ""
}
func getBadURLFromErr(strErr string) string {
	re := regexp.MustCompile("https?.+")
	found := re.FindString(strErr)
	return found
}