Initial commit and macOS install

This commit is contained in:
Filippo Valsorda
2018-06-25 01:32:41 -04:00
commit cbca29dc62
28 changed files with 3620 additions and 0 deletions

25
vendor/github.com/DHowett/go-plist/util.go generated vendored Normal file
View File

@@ -0,0 +1,25 @@
package plist
import "io"
type countedWriter struct {
io.Writer
nbytes int
}
func (w *countedWriter) Write(p []byte) (int, error) {
n, err := w.Writer.Write(p)
w.nbytes += n
return n, err
}
func (w *countedWriter) BytesWritten() int {
return w.nbytes
}
func unsignedGetBase(s string) (string, int) {
if len(s) > 1 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X') {
return s[2:], 16
}
return s, 10
}