]> Cypherpunks repositories - gostls13.git/commitdiff
- fixed untab.go to compile again
authorRobert Griesemer <gri@golang.org>
Thu, 15 Jan 2009 23:14:19 +0000 (15:14 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 15 Jan 2009 23:14:19 +0000 (15:14 -0800)
R=r
OCL=22871
CL=22871

usr/gri/pretty/untab.go

index b01fd1e95d93913e8741910adb3b0aa642624452..dea25c51fb6f2ba8d2e4bf11a33c63a440c87322 100644 (file)
@@ -19,16 +19,16 @@ var (
 )
 
 
-func Error(format string, params ...) {
-       fmt.printf(format, params);
+func error(format string, params ...) {
+       fmt.Printf(format, params);
        sys.exit(1);
 }
 
 
-func Untab(name string, src *os.FD, dst *tabwriter.Writer) {
+func untab(name string, src *os.FD, dst *tabwriter.Writer) {
        n, err := io.Copy(src, dst);
        if err != nil {
-               Error("error while processing %s (%v)", name, err);
+               error("error while processing %s (%v)", name, err);
        }
        //dst.Flush();
 }
@@ -46,13 +46,13 @@ func main() {
                        name := flag.Arg(i);
                        src, err := os.Open(name, os.O_RDONLY, 0);
                        if err != nil {
-                               Error("could not open %s (%v)\n", name, err);
+                               error("could not open %s (%v)\n", name, err);
                        }
-                       Untab(name, src, dst);
+                       untab(name, src, dst);
                        src.Close();  // ignore errors
                }
        } else {
                // no files => use stdin
-               Untab("/dev/stdin", os.Stdin, dst);
+               untab("/dev/stdin", os.Stdin, dst);
        }
 }