mirror of
https://github.com/zellyn/diskii.git
synced 2024-11-25 19:31:46 +00:00
7aa075b594
Includes "applesoft decode" command to convert Applesoft bytes to listings.
18 lines
328 B
Go
18 lines
328 B
Go
// Copyright © 2016 Zellyn Hunter <zellyn@gmail.com>
|
|
|
|
// Package helpers contains various routines used to help cobra
|
|
// commands stay succinct.
|
|
package helpers
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
)
|
|
|
|
func FileContentsOrStdIn(s string) ([]byte, error) {
|
|
if s == "-" {
|
|
return ioutil.ReadAll(os.Stdin)
|
|
}
|
|
return ioutil.ReadFile(s)
|
|
}
|