diagnostic tool fixes
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
package itemprops
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/rs/zerolog"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
type Material struct {
|
||||
@ -50,7 +50,7 @@ func NewMaterialMap(path string, logger zerolog.Logger) (MaterialMap, error) {
|
||||
if strings.HasSuffix(path, ".json") {
|
||||
splt := strings.Split(path, "/")
|
||||
logger.Info().Msgf("loading %s %d", splt[len(splt)-1], info.Size())
|
||||
bytes, err := ioutil.ReadFile(path)
|
||||
bytes, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -60,7 +60,7 @@ func NewMaterialMap(path string, logger zerolog.Logger) (MaterialMap, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for idx, _ := range ttmp {
|
||||
for idx := range ttmp {
|
||||
tmp[idx] = append(tmp[idx], ttmp[idx]...)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user