func (d *Dogo) Compare() {
	changed := false

	for p, t := range d.Files {
		info, err := os.Stat(p)
		if err != nil {
			delete(d.Files, p)
			continue
		}

		//new modtime
		nt := info.ModTime()

		if nt.Sub(t) > 0 {
			d.Files[p] = nt
			changed = true
			fmt.Printf("[dogo] Changed files: %s\n", filepath.Base(p))
		}
	}

	if changed == true {
		d.isModified = true
	} else {
		d.isModified = false
	}
}
//compare source file's modify time
compare source file's modify time
// compare source file ' s modify time
func (d *Dogo) Compare() {
	changed := false
	for p, t := range d.Files {
		info, err := os.Stat(p)
		if err != nil {
			delete(d.Files, p)
			continue
		}
		nt := info.ModTime()
		if nt.Sub(t) > 0 {
			d.Files[p] = nt
			changed = true
			fmt.Printf("[dogo] Changed files: %s\n", filepath.Base(p))
		}
	}
	if changed == true {
		d.isModified = true
	} else {
		d.isModified = false
	}
}
func ( d * Dogo ) Compare ( ) { changed := false for p , t := range d . Files { info , err := os . Stat ( p ) if err != nil { delete ( d . Files , p ) continue } nt := info . ModTime ( ) if nt . Sub ( t ) > 0 { d . Files [ p ] = nt changed = true fmt . Printf ( " \n " , filepath . Base ( p ) ) } } if changed == true { d . isModified = true } else { d . isModified = false } }
compare source file's modify time
compare source file ' s modify time
//new modtime