Skip to content

Commit

Permalink
fixed absolute path shame and camelCase file names
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed Aug 25, 2019
1 parent b74a4d3 commit 07e00ba
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions serializeCard.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cardobject

import "fmt"
//import "io/ioutil"
import "github.com/xeipuuv/gojsonschema"
import "encoding/json"

Expand All @@ -24,7 +25,10 @@ func ProcessCard (cardJson string) string {
}

func validateCard(s string) bool {
schemaLoader := gojsonschema.NewReferenceLoader("file://C:/Users/marius/Documents/goworkspace/src/github.com/DecentralCardGame/cardobject/schema/cardSchema.json")
//file, err := ioutil.ReadFile("schema/cardschema.json")
//fmt.Println(file)

schemaLoader := gojsonschema.NewReferenceLoader("file://schema/cardSchema.json")
documentLoader := gojsonschema.NewStringLoader(s)

result, err := gojsonschema.Validate(schemaLoader, documentLoader)
Expand All @@ -42,4 +46,4 @@ func validateCard(s string) bool {
}
return true//false
}
}
}

0 comments on commit 07e00ba

Please sign in to comment.