OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 package main | 7 package main |
8 | 8 |
9 // Example use: | 9 // Example use: |
10 // git clone https://skia.googlesource.com/skia.git | 10 // git clone https://skia.googlesource.com/skia.git |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 }() | 143 }() |
144 if os.Args[2] == "-" { | 144 if os.Args[2] == "-" { |
145 if err := fiddler(skiaSrc, os.Stdin, os.Stdout, tempDir)
; err != nil { | 145 if err := fiddler(skiaSrc, os.Stdin, os.Stdout, tempDir)
; err != nil { |
146 glog.Fatal(err) | 146 glog.Fatal(err) |
147 } | 147 } |
148 } else { | 148 } else { |
149 inputFile, err := os.Open(os.Args[2]) | 149 inputFile, err := os.Open(os.Args[2]) |
150 if err != nil { | 150 if err != nil { |
151 glog.Fatalf("unable to open \"%s\": %v", os.Args
[2], err) | 151 glog.Fatalf("unable to open \"%s\": %v", os.Args
[2], err) |
152 } | 152 } |
153 » » » util.Close(inputFile) | 153 » » » defer util.Close(inputFile) |
154 if err = fiddler(skiaSrc, inputFile, os.Stdout, tempDir)
; err != nil { | 154 if err = fiddler(skiaSrc, inputFile, os.Stdout, tempDir)
; err != nil { |
155 glog.Fatal(err) | 155 glog.Fatal(err) |
156 } | 156 } |
157 } | 157 } |
158 } | 158 } |
159 } | 159 } |
OLD | NEW |