Documentation
¶
Overview ¶
pkg/stdlib/array.go Array utilities for the Xxlang standard library.
pkg/stdlib/bytes.go Byte manipulation utilities for the Xxlang standard library.
pkg/stdlib/bytesbuffer.go BytesBuffer module for efficient byte buffer operations.
pkg/stdlib/collections.go Collection utilities for the Xxlang standard library.
pkg/stdlib/concurrent.go Concurrency built-in functions for Xxlang
pkg/stdlib/crypto.go Cryptography utilities for the Xxlang standard library. Pure Go implementation using standard library - no CGO required. Includes Charlang-compatible encryption functions (TXTE, TXDEE, TXDEF, AES).
pkg/stdlib/csv.go CSV parsing and generation utilities for the Xxlang standard library.
pkg/stdlib/db.go Database module for Xxlang. Provides database connection, query, and execution capabilities. Supports SQLite, MySQL, PostgreSQL, Oracle, and MSSQL Server. All drivers are pure Go implementations (no CGO required).
Driver names:
- SQLite: "sqlite"
- MySQL: "mysql"
- PostgreSQL: "postgres"
- Oracle: "oracle"
- MSSQL Server: "mssql"
pkg/stdlib/debug.go Debug utilities for the Xxlang standard library.
pkg/stdlib/encoding.go Encoding utilities for the Xxlang standard library.
pkg/stdlib/env.go Environment variables and configuration utilities for the Xxlang standard library.
pkg/stdlib/file.go File module for streaming file operations in Xxlang standard library.
pkg/stdlib/fmt.go Advanced formatting utilities for the Xxlang standard library.
pkg/stdlib/fp.go Functional programming utilities for the Xxlang standard library.
Package stdlib provides the standard library modules for Xxlang. This file contains the GUI module for WebView2 support.
pkg/stdlib/io.go I/O utilities for the Xxlang standard library.
pkg/stdlib/json.go JSON utilities for the Xxlang standard library. This module provides comprehensive JSON parsing, serialization, and file operations. The builtin functions toJson and fromJson are aliases for json.stringify and json.parse respectively.
pkg/stdlib/jsonpath.go JSONPath implementation for querying and manipulating JSON objects. JSONPath syntax reference: https://goessner.net/articles/JsonPath/
pkg/stdlib/log.go Logging utilities for the Xxlang standard library.
pkg/stdlib/math.go Standard library math module.
pkg/stdlib/net.go Network utilities for the Xxlang standard library.
pkg/stdlib/os.go OS utilities for the Xxlang standard library.
pkg/stdlib/pdf.go PDF processing module for Xxlang. Provides functions for reading, creating, and manipulating PDF files. Implemented using only Go standard library - no third-party dependencies.
pkg/stdlib/pptx.go PPTX module for Xxlang - PowerPoint file handling.
pkg/stdlib/queue.go Queue module for Xxlang - FIFO data structure.
pkg/stdlib/regex.go Regular expression utilities for the Xxlang standard library. Uses regexp2 for full PCRE support including lookahead/lookbehind.
pkg/stdlib/set.go Set module for Xxlang - unordered collection of unique elements.
pkg/stdlib/sort.go Sorting utilities for the Xxlang standard library.
pkg/stdlib/stdlib.go Standard library modules for Xxlang.
pkg/stdlib/strconv.go String conversion utilities for the Xxlang standard library.
pkg/stdlib/string.go String utilities for the Xxlang standard library.
pkg/stdlib/stringbuilder.go StringBuilder module for efficient string concatenation.
pkg/stdlib/text.go Text processing utilities for the Xxlang standard library.
pkg/stdlib/time.go Time utilities for the Xxlang standard library.
pkg/stdlib/utils.go Utility functions for the Xxlang standard library.
pkg/stdlib/uuid.go UUID generation utilities for the Xxlang standard library.
pkg/stdlib/validate.go Validation utilities for the Xxlang standard library.
pkg/stdlib/xlsx.go XLSX module for Xxlang - Excel file handling.
pkg/stdlib/xml.go XML module for Xxlang - XML document handling.
pkg/stdlib/zip.go ZIP file utilities for the Xxlang standard library. Provides comprehensive ZIP creation, extraction, and manipulation with full UTF-8 support.
UTF-8/Unicode Filename Support: - Modern ZIP tools correctly set the UTF-8 flag for non-ASCII filenames - Go's archive/zip package automatically handles UTF-8 flagged entries - For legacy ZIP files with GBK/CP437 encoded names, use the gbkToUtf8 option - This module includes special handling for Chinese and other Unicode filenames
Index ¶
- Variables
- func Array(elements ...objects.Object) *objects.Array
- func Bool(v bool) *objects.Bool
- func BuiltinFunc(fn func(...objects.Object) objects.Object) *objects.Builtin
- func Error(msg string) *objects.Error
- func Float(v float64) *objects.Float
- func GetConfigMap() map[string]interface{}
- func Has(name string) bool
- func Int(v int64) *objects.Int
- func Null() *objects.Null
- func Paths(obj objects.Object) []string
- func Register(m *Module)
- func SetScriptArgs(args []string)
- func String(v string) *objects.String
- type CompiledRegex
- type JSONPath
- type JSONPathMatch
- type Module
Constants ¶
This section is empty.
Variables ¶
var Registry = make(map[string]*Module)
Registry holds all registered standard library modules.
Functions ¶
func BuiltinFunc ¶
BuiltinFunc creates a builtin function object.
func GetConfigMap ¶ added in v0.4.19
func GetConfigMap() map[string]interface{}
GetConfigMap reads the Xxlang configuration and returns it as a Go map. This is useful for accessing config values from Go code before the VM starts. Search path priority: 1. ~/.xxl/settings.json (user home directory) 2. /.xxl/settings.json (Linux/Unix systems) 3. C:\.xxl\settings.json (Windows systems) Returns an empty map if no config file is found.
func SetScriptArgs ¶ added in v0.4.19
func SetScriptArgs(args []string)
SetScriptArgs sets the script-specific arguments for scripts to access
Types ¶
type CompiledRegex ¶
CompiledRegex represents a compiled regular expression
func (*CompiledRegex) HashKey ¶
func (cr *CompiledRegex) HashKey() objects.HashKey
func (*CompiledRegex) Inspect ¶
func (cr *CompiledRegex) Inspect() string
func (*CompiledRegex) ToBool ¶
func (cr *CompiledRegex) ToBool() *objects.Bool
func (*CompiledRegex) Type ¶
func (cr *CompiledRegex) Type() objects.ObjectType
func (*CompiledRegex) TypeTag ¶
func (cr *CompiledRegex) TypeTag() objects.TypeTag
type JSONPath ¶ added in v0.4.25
type JSONPath struct {
// contains filtered or unexported fields
}
JSONPath represents a parsed JSONPath expression
func ParseJSONPath ¶ added in v0.4.25
ParseJSONPath parses a JSONPath expression string into a JSONPath struct
func (*JSONPath) GetWithPath ¶ added in v0.4.25
func (jp *JSONPath) GetWithPath(obj objects.Object) []JSONPathMatch
GetWithPath retrieves values along with their paths
type JSONPathMatch ¶ added in v0.4.25
JSONPathMatch represents a match result with its path
Source Files
¶
- array.go
- bytes.go
- bytesbuffer.go
- collections.go
- concurrent.go
- crypto.go
- csv.go
- db.go
- debug.go
- encoding.go
- env.go
- file.go
- fmt.go
- fp.go
- gui.go
- io.go
- json.go
- jsonpath.go
- log.go
- math.go
- net.go
- os.go
- pdf.go
- pptx.go
- queue.go
- regex.go
- set.go
- sort.go
- stdlib.go
- strconv.go
- string.go
- stringbuilder.go
- text.go
- time.go
- utils.go
- uuid.go
- validate.go
- xlsx.go
- xml.go
- zip.go