simplify parseHashFile
This commit is contained in:
parent
d61579313a
commit
37028a7f0f
@ -131,17 +131,8 @@ type Example struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func parseHashFile(sourcePath string) (string, string) {
|
func parseHashFile(sourcePath string) (string, string) {
|
||||||
var codehash, urlkey string
|
|
||||||
lines := readLines(sourcePath)
|
lines := readLines(sourcePath)
|
||||||
for idx, line := range lines {
|
return lines[0], lines[1]
|
||||||
switch idx {
|
|
||||||
case 0:
|
|
||||||
codehash = line
|
|
||||||
case 1:
|
|
||||||
urlkey = line
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return codehash, urlkey
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func resetUrlHashFile(codehash, code, sourcePath string) string {
|
func resetUrlHashFile(codehash, code, sourcePath string) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user