You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
240 B
18 lines
240 B
2 weeks ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"path/filepath"
|
||
|
)
|
||
|
|
||
|
func check(e error, s string) {
|
||
|
if e != nil {
|
||
|
fmt.Errorf(s)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func stripExtension(filename string) string {
|
||
|
ext := filepath.Ext(filename)
|
||
|
return filename[:len(filename)-len(ext)]
|
||
|
}
|