fix lint errors
This commit is contained in:
parent
2fd1764cce
commit
27ab3711a6
@ -98,14 +98,20 @@ func (a *App) SetOutput(uri string) (err error) {
|
||||
|
||||
// Each document has an `imports` keyword which can be used to load dependencies
|
||||
func (a *App) LoadDocumentImports() error {
|
||||
for _, d := range a.Documents {
|
||||
for _, importedDocument := range d.ImportedDocuments() {
|
||||
for i, d := range a.Documents {
|
||||
importedDocs := d.ImportedDocuments()
|
||||
for _, importedDocument := range importedDocs {
|
||||
docURI := folio.URI(importedDocument.GetURI())
|
||||
if _, ok := a.ImportedMap[docURI]; !ok {
|
||||
a.ImportedMap[docURI] = importedDocument
|
||||
a.Documents = append(a.Documents, nil)
|
||||
copy(a.Documents[i+1:], a.Documents[i:])
|
||||
a.Documents[i] = importedDocument
|
||||
/*
|
||||
if _, outputErr := a.emitter.Emit(importedDocument, nil); outputErr != nil {
|
||||
return outputErr
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ func TestCreateContainerImagePush(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestContainerImageContextDocument(t *testing.T) {
|
||||
contextDir, _ := filepath.Abs(filepath.Join(TempDir, "context"))
|
||||
contextDir, _ := filepath.Abs(TempDir.FilePath("context"))
|
||||
etcDir, _ := filepath.Abs(filepath.Join(contextDir, "etc"))
|
||||
binDir, _ := filepath.Abs(filepath.Join(contextDir, "bin"))
|
||||
|
||||
|
@ -127,9 +127,9 @@ func TestPKIEncodeKeys(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPKIResource(t *testing.T) {
|
||||
privateKeyFile, _ := filepath.Abs(filepath.Join(TempDir, "fooprivatekey.pem"))
|
||||
publicKeyFile, _ := filepath.Abs(filepath.Join(TempDir, "foopublickey.pem"))
|
||||
certFile, _ := filepath.Abs(filepath.Join(TempDir, "foocert.pem"))
|
||||
privateKeyFile, _ := filepath.Abs(TempDir.FilePath("fooprivatekey.pem"))
|
||||
publicKeyFile, _ := filepath.Abs(TempDir.FilePath("foopublickey.pem"))
|
||||
certFile, _ := filepath.Abs(TempDir.FilePath("foocert.pem"))
|
||||
var resourceYaml, readResourceYaml strings.Builder
|
||||
|
||||
expected := fmt.Sprintf(`
|
||||
|
@ -31,7 +31,7 @@ func TestSchemaValidateJSON(t *testing.T) {
|
||||
s := NewSchema("file")
|
||||
assert.NotEqual(t, nil, s)
|
||||
|
||||
file, _ := filepath.Abs(filepath.Join(TempDir, "fooread.txt"))
|
||||
file, _ := filepath.Abs(TempDir.FilePath("fooread.txt"))
|
||||
|
||||
expectedAtime, atimeErr := time.Parse(time.RFC3339Nano, "2001-12-15T01:01:01.000000001Z")
|
||||
assert.Nil(t, atimeErr)
|
||||
|
Loading…
Reference in New Issue
Block a user