code: func archiveFileVisitor(dir string, tempFile *string, signature *[]byte, archivePath string, filedata io.Reader) error {
  	var err error
  	filename := path.Base(archivePath)
  	archiveDir := path.Dir(archivePath)
  	l.Debugf("considering file %s", archivePath)
  	switch filename {
  	case "syncthing", "syncthing.exe":
  		archiveDirs := strings.Split(archiveDir, "/")
  		if len(archiveDirs) > 1 {
  			// Don't consider "syncthing" files found too deeply, as they may be
  			// other things.
  			return nil
  		}
  		l.Debugf("found upgrade binary %s", archivePath)
  		*tempFile, err = writeBinary(dir, io.LimitReader(filedata, maxBinarySize))
  		if err != nil {
  			return err
  		}
  
  	case "release.sig":
  		l.Debugf("found signature %s", archivePath)
  		*signature, err = ioutil.ReadAll(io.LimitReader(filedata, maxSignatureSize))
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // archiveFileVisitor is called for each file in an archive. It may set
  // tempFile and signature.