Exemplo n.º 1
0
func listPinned() (string, error) {
	var hash string
	var err error
	if logger.Level > 0 {
		hash, err = ipfs.ListPinnedFromIPFS(logger.Writer)
	} else {
		hash, err = ipfs.ListPinnedFromIPFS(bytes.NewBuffer([]byte{}))
	}
	if err != nil {
		return "", err
	}
	return hash, nil
}
Exemplo n.º 2
0
func listPinned() (string, error) {
	var hash string
	var err error
	if log.GetLevel() > 0 {
		hash, err = ipfs.ListPinnedFromIPFS(os.Stdout)
	} else {
		hash, err = ipfs.ListPinnedFromIPFS(bytes.NewBuffer([]byte{}))
	}
	if err != nil {
		return "", err
	}
	return hash, nil
}