code: func checkName(name string) error {
  	if len(name) == 0 {
  		return fmt.Errorf("No name given for tar element.")
  	}
  	comp := strings.Split(name, string(os.PathSeparator))
  	if len(comp) > 0 && comp[0] == "" {
  		return fmt.Errorf("No absolute paths allowed.")
  	}
  	for i, c := range comp {
  		switch {
  		case c == "" && i != len(comp)-1:
  			// don't allow an empty name, unless it is the last element... handles
  			// cases where we may have "./" come in as the name
  			return fmt.Errorf("Empty name in file path.")
  		case c == "..":
  			return fmt.Errorf("Double dots not allowed in path.")
  		}
  	}
  	return nil
  }
docs: // Checks the security of the given name. Anything that looks
  // fishy will be rejected.