mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Update github.com/mjibson/esc (#515)
* Update github.com/mjibson/esc * Update github.com/mjibson/esc * Fix generate.go to new signature for esc.Run * Internal: Upgrade to lastest "esc"
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Code generated by "esc "; DO NOT EDIT.
|
||||
// Code generated by "esc"; DO NOT EDIT.
|
||||
|
||||
package js
|
||||
|
||||
@ -6,6 +6,8 @@ import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
@ -100,7 +102,24 @@ func (f *_escFile) Close() error {
|
||||
}
|
||||
|
||||
func (f *_escFile) Readdir(count int) ([]os.FileInfo, error) {
|
||||
return nil, nil
|
||||
if !f.isDir {
|
||||
return nil, fmt.Errorf(" escFile.Readdir: '%s' is not directory", f.name)
|
||||
}
|
||||
|
||||
fis, ok := _escDirs[f.local]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf(" escFile.Readdir: '%s' is directory, but we have no info about content of this dir, local=%s", f.name, f.local)
|
||||
}
|
||||
limit := count
|
||||
if count <= 0 || limit > len(fis) {
|
||||
limit = len(fis)
|
||||
}
|
||||
|
||||
if len(fis) == 0 && count > 0 {
|
||||
return nil, io.EOF
|
||||
}
|
||||
|
||||
return fis[0:limit], nil
|
||||
}
|
||||
|
||||
func (f *_escFile) Stat() (os.FileInfo, error) {
|
||||
@ -191,6 +210,7 @@ func _escFSMustString(useLocal bool, name string) string {
|
||||
var _escData = map[string]*_escFile{
|
||||
|
||||
"/helpers.js": {
|
||||
name: "helpers.js",
|
||||
local: "pkg/js/helpers.js",
|
||||
size: 21786,
|
||||
modtime: 0,
|
||||
@ -291,9 +311,6 @@ cWUv15QfCPzz0btv4f5RYO9rb3+7uOohVn7eYr4q6Kcx+aec+Efv3lXfWRp1Fn1b8RFjLSLD60GFtJJ+
|
||||
ZI8PWcxTMsc9EklYB9Tf8R1JEf8vAAD//1RgxiUaVQAA
|
||||
`,
|
||||
},
|
||||
|
||||
"/": {
|
||||
isDir: true,
|
||||
local: "pkg/js",
|
||||
},
|
||||
}
|
||||
|
||||
var _escDirs = map[string][]os.FileInfo{}
|
||||
|
Reference in New Issue
Block a user