func listFile(objectHash string) (string, error) { var hash string var err error if logger.Level > 0 { hash, err = ipfs.ListFromIPFS(objectHash, logger.Writer) } else { hash, err = ipfs.ListFromIPFS(objectHash, bytes.NewBuffer([]byte{})) } if err != nil { return "", err } return hash, nil }
func listFile(objectHash string) (string, error) { var hash string var err error if log.GetLevel() > 0 { hash, err = ipfs.ListFromIPFS(objectHash, os.Stdout) } else { hash, err = ipfs.ListFromIPFS(objectHash, bytes.NewBuffer([]byte{})) } if err != nil { return "", err } return hash, nil }