Remove unused raczlib constants

This commit is contained in:
Nigel Tao committed 2019-08-08 15:41:00 +10:00
1 parent 4d2f575f2a
commit 31eb600ad3
2 files changed
+3 -22

No files matched your search

+3 -3
View File
@@ -287,12 +287,12 @@ func decode(r io.Reader, usingStdin bool) error {
} }
func encode(r io.Reader) error { func encode(r io.Reader) error {
indexLocation := raczlib.IndexLocation(0) indexLocation := rac.IndexLocation(0)
switch *indexlocationFlag { switch *indexlocationFlag {
case "start": case "start":
indexLocation = raczlib.IndexLocationAtStart indexLocation = rac.IndexLocationAtStart
case "end": case "end":
indexLocation = raczlib.IndexLocationAtEnd indexLocation = rac.IndexLocationAtEnd
default: default:
return errors.New("invalid -indexlocation") return errors.New("invalid -indexlocation")
} }
-19
View File
@@ -20,22 +20,3 @@
// The RAC specification is at // The RAC specification is at
// https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md // https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
package raczlib package raczlib
import (
"github.com/google/wuffs/lib/rac"
)
const (
// MaxSize is the maximum RAC file size (in both CSpace and DSpace).
MaxSize = rac.MaxSize
)
// IndexLocation is whether the index is at the start or end of the RAC file.
//
// See the RAC specification for further discussion.
type IndexLocation = rac.IndexLocation
const (
IndexLocationAtEnd = rac.IndexLocationAtEnd
IndexLocationAtStart = rac.IndexLocationAtStart
)