github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/types/paths/init.go (about)

     1  package paths
     2  
     3  import (
     4  	"github.com/lmorg/murex/lang"
     5  	"github.com/lmorg/murex/lang/stdio"
     6  	"github.com/lmorg/murex/lang/types"
     7  )
     8  
     9  func init() {
    10  	// Register data type
    11  	lang.Marshallers[types.Path] = marshalPath
    12  	lang.Marshallers[types.Paths] = marshalPaths
    13  	lang.Unmarshallers[types.Path] = unmarshalPath
    14  	lang.Unmarshallers[types.Paths] = unmarshalPaths
    15  	lang.ReadIndexes[types.Path] = indexPath
    16  	lang.ReadIndexes[types.Paths] = indexPaths
    17  	lang.ReadNotIndexes[types.Path] = indexPath
    18  	lang.ReadNotIndexes[types.Paths] = indexPaths
    19  
    20  	stdio.RegisterReadArray(types.Path, readArrayPath)
    21  	stdio.RegisterReadArray(types.Paths, readArrayPaths)
    22  	stdio.RegisterReadArrayWithType(types.Path, readArrayWithTypePath)
    23  	stdio.RegisterReadArrayWithType(types.Paths, readArrayWithTypePaths)
    24  	//stdio.RegisterReadMap(types.Json, readMap)
    25  	stdio.RegisterWriteArray(types.Path, newArrayWriterPath)
    26  	stdio.RegisterWriteArray(types.Paths, newArrayWriterPaths)
    27  }