func (p *Phracked) init(issue string) {
	p.clean()
	var err error
	reg, err := regexp.Compile("[^0-9]+")
	if err != nil {
		cleanFatal(err)
	}
	safer := reg.ReplaceAllString(issue, "")
	if safer == "" {
		safer = "1"
	}
	p.status = make(chan string, 1)
	p.issue = safer
	p.url = "http://www.phrack.org/archives/tgz/phrack" + p.issue + ".tar.gz"
	p.tempPrefix = "issue-" + p.issue + "-"
	p.temp, err = ioutil.TempDir("", p.tempPrefix)
	if err != nil {
		cleanFatal(err)
	}
	p.filePath = p.temp + "/" + p.issue + ".tar.gz"
	p.tgz, err = os.Create(p.filePath)
	if err != nil {
		cleanFatal(err)
	}
}
/**
 *  Initialize all the data in the struct based on the issue number.
 */
Initialize all the data in the struct based on the issue number.
/ ** * Initialize all the data in the struct based on the issue number . * /
func (p *Phracked) init(issue string) {
	p.clean()
	var err error
	reg, err := regexp.Compile("[^0-9]+")
	if err != nil {
		cleanFatal(err)
	}
	safer := reg.ReplaceAllString(issue, "")
	if safer == "" {
		safer = "1"
	}
	p.status = make(chan string, 1)
	p.issue = safer
	p.url = "http://www.phrack.org/archives/tgz/phrack" + p.issue + ".tar.gz"
	p.tempPrefix = "issue-" + p.issue + "-"
	p.temp, err = ioutil.TempDir("", p.tempPrefix)
	if err != nil {
		cleanFatal(err)
	}
	p.filePath = p.temp + "/" + p.issue + ".tar.gz"
	p.tgz, err = os.Create(p.filePath)
	if err != nil {
		cleanFatal(err)
	}
}
func ( p * Phracked ) init ( issue string ) { p . clean ( ) var err error reg , err := regexp . Compile ( " " ) if err != nil { cleanFatal ( err ) } safer := reg . ReplaceAllString ( issue , " " ) if safer == " " { safer = " " } p . status = make ( chan string , 1 ) p . issue = safer p . url = " " + p . issue + " " p . tempPrefix = " " + p . issue + " " p . temp , err = ioutil . TempDir ( " " , p . tempPrefix ) if err != nil { cleanFatal ( err ) } p . filePath = p . temp + " " + p . issue + " " p . tgz , err = os . Create ( p . filePath ) if err != nil { cleanFatal ( err ) } }
Initialize all the data in the struct based on the issue number.
Initialize all the data in the struct based on the issue number .