-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (39 loc) · 25.6 KB
/
index.html
File metadata and controls
42 lines (39 loc) · 25.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html><html class="dark" lang="en"><head><meta charset="utf-8"><link href="/favicon.ico" rel="icon"><link href="/favicon.svg" rel="icon" type="image/svg+xml"><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="#000000" name="theme-color"><link href="/rss.xml" rel="alternate" type="application/rss+xml" title="Fezcodex RSS Feed"><meta content="codex by fezcode..." name="description"><meta content="website" property="og:type"><meta content="https://fezcode.com/" property="og:url"><meta content="Fezcodex - Personal Blog and Projects" property="og:title"><meta content="Discover logs, posts, projects, and stories from Fezcode." property="og:description"><meta content="/images/asset/ogtitle.png" property="og:image"><meta content="summary_large_image" name="twitter:card"><meta content="https://fezcode.com/" name="twitter:url"><meta content="Fezcodex - Personal Blog and Projects" name="twitter:title"><meta content="Discover logs, posts, projects, and stories from Fezcode." name="twitter:description"><meta content="/images/asset/ogtitle.png" name="twitter:image"><link href="/logo192.png" rel="apple-touch-icon"><link href="/manifest.json" rel="manifest"><link href="https://fonts.googleapis.com" rel="preconnect"><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin=""><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Arvo&family=Inter&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap" rel="stylesheet"><title>go-piml | Fezcodex</title><title>fezcodex</title><script defer src="/static/js/main.87f8d95f.js"></script><link href="/static/css/main.c666da2c.css" rel="stylesheet"><link href="https://fonts.googleapis.com" rel="preconnect"><link href="https://fonts.gstatic.com" rel="preconnect"><link href="https://github.com" rel="preconnect"><link href="https://release-assets.githubusercontent.com" rel="preconnect"><meta content="go-piml is a Go package that provides functionality to marshal and unmarshal data to and from the PIML format." name="description"><meta content="piml, markup-language, go" name="keywords"><meta content="go-piml | Fezcodex" property="og:title"><meta content="go-piml is a Go package that provides functionality to marshal and unmarshal data to and from the PIML format." property="og:description"><meta content="https://fezcode.com/images/defaults/piml-red.png" property="og:image"><meta content="https://fezcode.com/projects/go-piml/" property="og:url"><meta content="website" property="og:type"><meta content="Fezcodex" property="og:site_name"><meta content="https://fezcode.com/images/defaults/piml-red.png" property="og:image:secure_url"><meta content="summary_large_image" name="twitter:card"><meta content="go-piml | Fezcodex" name="twitter:title"><meta content="go-piml is a Go package that provides functionality to marshal and unmarshal data to and from the PIML format." name="twitter:description"><meta content="https://fezcode.com/images/defaults/piml-red.png" name="twitter:image"><meta content="https://fezcode.com/projects/go-piml/" name="twitter:url"><link href="https://fezcode.com/projects/go-piml/" rel="canonical"></head><body class="bg-slate-950" style="cursor:default;user-select:auto"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div class="bg-emerald-600 text-white relative z-[100] border-b-2 border-black selection:bg-white selection:text-black" style="height:auto;opacity:1"><div class="max-w-7xl mx-auto px-4 py-3 flex items-center justify-between gap-4"><div class="flex items-center gap-3 flex-1"><span class="shrink-0"><svg fill="currentColor" height="20" viewBox="0 0 256 256" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"></path></svg></span><p class="font-mono text-xs md:text-sm font-black uppercase tracking-widest leading-tight">CLIMB THE TALL BUILDING 0 IS ONLINE: BUILD YOUR DECK AND CLIMB. ACCESS AT /CLIMB-THE-TALL-BUILDING-0.</p><a href="https://fezcode.com/climb-the-tall-building-0/" class="shrink-0 inline-flex items-center gap-1 bg-black/20 hover:bg-black/40 px-3 py-1 rounded-sm border border-white/20 transition-all font-bold text-[10px] uppercase">Play Climb the Tall Building 0<svg fill="currentColor" height="12" viewBox="0 0 256 256" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"></path></svg></a></div><button aria-label="Dismiss" class="p-1 hover:bg-black/20 rounded-sm transition-colors shrink-0"><svg fill="currentColor" height="20" viewBox="0 0 256 256" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path></svg></button></div><div class="h-0.5 w-full bg-black/10"></div></div><div class="bg-[#050505] min-h-screen font-sans flex"><div class="flex-1 flex flex-col transition-all duration-300 md:ml-0"><main class="flex-grow"><div class="min-h-screen bg-[#0a0a0a] text-white p-4 md:p-8 font-instr-sans selection:bg-white selection:text-black"><div class="max-w-[1600px] mx-auto grid grid-cols-1 md:grid-cols-4 lg:grid-cols-6 gap-0 border border-white/10 overflow-hidden rounded-2xl"><div class="col-span-full border-b border-white/10 p-6 flex justify-between items-center bg-[#111]"><a href="/projects" class="group flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-white/50 hover:text-white transition-colors" data-discover="true"><svg fill="currentColor" height="16" viewBox="0 0 256 256" width="16" xmlns="http://www.w3.org/2000/svg" class="group-hover:-translate-x-1 transition-transform"><path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"></path></svg>Back to Archive</a><div class="flex gap-4"><a href="https://github.com/fezcode/go-piml" class="p-2 border border-white/10 rounded-full hover:bg-white hover:text-black transition-all" rel="noopener noreferrer" target="_blank"><svg fill="currentColor" height="20" viewBox="0 0 256 256" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z"></path></svg></a><a href="https://pkg.go.dev/github.com/fezcode/go-piml" class="p-2 border border-white/10 rounded-full hover:bg-white hover:text-black transition-all" rel="noopener noreferrer" target="_blank"><svg fill="currentColor" height="20" viewBox="0 0 256 256" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"></path></svg></a></div></div><div class="col-span-full md:col-span-4 lg:col-span-4 h-[400px] md:h-[600px] flex flex-col items-center justify-center p-12 border-b md:border-b-0 md:border-r border-white/10 relative overflow-hidden bg-[#0a0a0a]"><div class="absolute inset-0 opacity-20 pointer-events-none"><div class="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-white/10 via-transparent to-transparent"></div></div><div class="text-center z-10" style="opacity:1;transform:none"><h1 class="text-6xl md:text-8xl lg:text-9xl font-instr-serif italic leading-none mb-4 uppercase">go-piml</h1><p class="text-lg md:text-2xl font-instr-sans uppercase tracking-[0.2em] opacity-40 max-w-2xl mx-auto">go-piml is a Go package that provides functionality to marshal and unmarshal data to and from the PIML format.</p></div></div><div class="col-span-full md:col-span-2 lg:col-span-2 grid grid-cols-1 border-b md:border-b-0 border-white/10"><div class="p-8 border-b border-white/10 flex flex-col justify-center bg-[#111]"><div class="flex items-center gap-3 mb-4 opacity-40"><svg fill="currentColor" height="18" viewBox="0 0 256 256" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Z"></path></svg><span class="text-[10px] font-bold uppercase tracking-widest">Release Date</span></div><div class="text-3xl font-instr-serif italic">2025-11-01</div></div><div class="p-8 border-b border-white/10 flex flex-col justify-center bg-[#0a0a0a]"><div class="flex items-center gap-3 mb-4 opacity-40"><svg fill="currentColor" height="18" viewBox="0 0 256 256" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"></path></svg><span class="text-[10px] font-bold uppercase tracking-widest">Status</span></div><div class="flex items-center gap-3"><svg fill="currentColor" height="24" viewBox="0 0 256 256" width="24" xmlns="http://www.w3.org/2000/svg" class="text-emerald-500"><path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"></path></svg><span class="text-2xl font-instr-sans font-bold uppercase tracking-tighter">Active</span></div></div><div class="p-8 flex flex-col justify-center bg-[#111]"><div class="flex items-center gap-3 mb-6 opacity-40"><span class="text-[10px] font-bold uppercase tracking-widest">Technologies</span></div><div class="flex flex-wrap gap-2"><span class="px-3 py-1 border border-white/20 rounded-full text-[10px] font-bold uppercase tracking-wider bg-white/5">piml</span><span class="px-3 py-1 border border-white/20 rounded-full text-[10px] font-bold uppercase tracking-wider bg-white/5">markup-language</span><span class="px-3 py-1 border border-white/20 rounded-full text-[10px] font-bold uppercase tracking-wider bg-white/5">go</span></div></div></div><div class="col-span-full md:col-span-4 lg:col-span-4 border-b md:border-b-0 md:border-r border-white/10 bg-[#0a0a0a] flex flex-col"><div class="p-8 md:p-12 border-b border-white/10 flex-grow"><div class="prose prose-invert max-w-none prose-headings:font-instr-serif prose-headings:italic prose-headings:font-normal prose-p:font-instr-sans prose-p:text-white/70 prose-p:leading-relaxed prose-p:text-lg prose-a:text-white prose-a:underline prose-a:decoration-white/20 hover:prose-a:decoration-white"><div class=""><h1>go-piml</h1><p><strong>Spec version</strong>: v1.1.0</p><p><code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">go-piml</code> is a high-performance, production-ready Go package for marshalling and unmarshalling PIML data. It is designed to feel native to Go developers, leveraging the standard library's idioms and providing a powerful reflection-based API similar to <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">encoding/json</code>.</p><p>As the PIML specification evolves, <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">go-piml</code> serves as the reference implementation for compiled languages, ensuring that performance and type safety are never compromised.</p><h2>Core Principles</h2><ul><li><strong>Developer Ergonomics</strong>: Use standard Go struct tags (<code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">piml:"key_name"</code>) to map your data structures effortlessly.</li><li><strong>Strict Typing</strong>: Seamlessly convert PIML primitives into Go's rich type system, including support for <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">time.Time</code>, custom pointers, and nested slices.</li><li><strong>Performant Parsing</strong>: The recursive descent parser is optimized for minimal allocations and high throughput.</li></ul><h2>Struct Tagging & Mapping</h2><p>PIML allows for clean separation between your code's data structures and the serialized format:</p><div class="relative my-8 group w-full"><div class="absolute top-0 left-0 w-full h-full bg-[#e5e5de] translate-x-1.5 translate-y-1.5 rounded-sm -z-10"></div><pre class="bg-[#1a1a1a] text-[#e5e5de] p-6 rounded-sm overflow-x-auto border-2 border-[#e5e5de]/20 font-mono text-sm shadow-sm leading-relaxed w-full"><code class="language-go" node="[object Object]">type Project struct {
ID int `piml:"id"`
Title string `piml:"title"`
Tags []string `piml:"tags"`
Released bool `piml:"is_released"`
Maintenance struct {
Active bool `piml:"active"`
} `piml:"maintenance"`
}
</code></pre></div><h2>Advanced PIML Example</h2><div class="relative my-8 group w-full"><div class="absolute top-0 left-0 w-full h-full bg-[#e5e5de] translate-x-1.5 translate-y-1.5 rounded-sm -z-10"></div><pre class="bg-[#1a1a1a] text-[#e5e5de] p-6 rounded-sm overflow-x-auto border-2 border-[#e5e5de]/20 font-mono text-sm shadow-sm leading-relaxed w-full"><code class="language-piml" node="[object Object]">(project_registry)
> (Project)
(id) 101
(title) Warp Drive Engine
(tags)
> physics
> propulsion
(is_released) true
(maintenance)
(active) true
(system_metrics)
(uptime) 14500
(load_averages)
> 0.15
> 0.22
> 0.08
(description)
Go implementation allows for deep nesting
of structures without losing the
human-readable quality of the file.
</code></pre></div><h2>Go Ecosystem Integration</h2><p><code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">go-piml</code> is built to fit into the Go ecosystem. Whether you are building a CLI tool that needs a readable config file, or a microservice that processes structured data, <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">go-piml</code> provides the reliability and speed expected of Go software.</p></div></div></div><div class="p-8 bg-[#111] border-t border-white/5"><div class="flex flex-col mb-6"><span class="text-[10px] font-bold uppercase tracking-[0.3em] opacity-30 mb-1">SEE ALSO</span><h3 class="text-xl font-instr-serif italic text-white/90 uppercase">Related Artifacts</h3></div><div class="prose prose-invert prose-sm max-w-none prose-ul:flex prose-ul:flex-wrap prose-ul:gap-x-8 prose-ul:gap-y-2 prose-ul:p-0 prose-ul:list-none prose-li:p-0 prose-a:text-white/60 hover:prose-a:text-white prose-a:no-underline prose-a:font-instr-sans prose-a:text-[11px] prose-a:uppercase prose-a:tracking-widest prose-a:transition-colors"><div class=""><ul><li><a href="/projects/piml">piml</a> - The core specification.</li><li><a href="/projects/piml.js">piml.js</a> - PIML for the JS ecosystem.</li><li><a href="/projects/piml-highlighter">PIML Highlighter</a> - VS Code extension.</li><li><a href="/apps/piml-lab">PIML Lab</a> - Interactive playground.</li></ul></div></div></div></div><div class="col-span-full md:col-span-2 lg:col-span-2 grid grid-cols-1"><div class="p-8 border-b border-white/10 last:border-b-0 bg-[#111]"><div class="flex flex-col mb-6"><span class="text-[10px] font-bold uppercase tracking-[0.3em] opacity-30 mb-1">FEATURES</span><h3 class="text-xl font-instr-serif italic text-white/90 uppercase">Powerful Logic</h3></div><div class="prose prose-invert prose-sm max-w-none prose-headings:font-instr-serif prose-headings:italic prose-headings:text-lg prose-p:font-instr-sans prose-p:text-white/60 prose-p:leading-relaxed"><div class=""><ul><li><strong>Intuitive Syntax:</strong> Easy-to-read key-value pairs, supporting nested structures.</li><li><strong>Go-like Tagging:</strong> Uses <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">piml:"tag"</code> struct tags for flexible field mapping.</li><li><strong>Primitive Types:</strong> Supports strings, integers, floats, and booleans.</li><li><strong>Complex Types:</strong> Handles structs, slices (arrays), and maps.</li><li><strong>Nil Handling:</strong> Explicitly represents <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">nil</code> for pointers, empty slices, and empty maps.</li><li><strong>Multi-line Strings:</strong> Supports multi-line string values with indentation.</li><li><strong>Comments:</strong> Allows single-line comments using <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">#</code> (only lines starting with <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">#</code> are treated as comments).</li><li><strong>Time Support:</strong> Marshals and unmarshals <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">time.Time</code> values using RFC3339Nano format.</li></ul></div></div></div><div class="p-8 border-b border-white/10 last:border-b-0 bg-[#0a0a0a]"><div class="flex flex-col mb-6"><span class="text-[10px] font-bold uppercase tracking-[0.3em] opacity-30 mb-1">INSTALLATION</span><h3 class="text-xl font-instr-serif italic text-white/90 uppercase">Getting Started</h3></div><div class="prose prose-invert prose-sm max-w-none prose-headings:font-instr-serif prose-headings:italic prose-headings:text-lg prose-p:font-instr-sans prose-p:text-white/60 prose-p:leading-relaxed"><div class=""><p>To use <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">go-piml</code> in your Go project, simply run:</p><div class="relative my-8 group w-full"><div class="absolute top-0 left-0 w-full h-full bg-[#e5e5de] translate-x-1.5 translate-y-1.5 rounded-sm -z-10"></div><pre class="bg-[#1a1a1a] text-[#e5e5de] p-6 rounded-sm overflow-x-auto border-2 border-[#e5e5de]/20 font-mono text-sm shadow-sm leading-relaxed w-full"><code class="language-bash" node="[object Object]">go get github.com/fezcode/go-piml
</code></pre></div></div></div></div><div class="p-8 border-b border-white/10 last:border-b-0 bg-[#111]"><div class="flex flex-col mb-6"><span class="text-[10px] font-bold uppercase tracking-[0.3em] opacity-30 mb-1">USAGE</span><h3 class="text-xl font-instr-serif italic text-white/90 uppercase">Practical Implementation</h3></div><div class="prose prose-invert prose-sm max-w-none prose-headings:font-instr-serif prose-headings:italic prose-headings:text-lg prose-p:font-instr-sans prose-p:text-white/60 prose-p:leading-relaxed"><div class=""><h3>Marshalling Go Structs to PIML</h3><div class="relative my-8 group w-full"><div class="absolute top-0 left-0 w-full h-full bg-[#e5e5de] translate-x-1.5 translate-y-1.5 rounded-sm -z-10"></div><pre class="bg-[#1a1a1a] text-[#e5e5de] p-6 rounded-sm overflow-x-auto border-2 border-[#e5e5de]/20 font-mono text-sm shadow-sm leading-relaxed w-full"><code class="language-go" node="[object Object]">cfg := Config{
SiteName: "My Awesome Site",
Port: 8080,
IsProduction: true,
}
pimlData, err := piml.Marshal(cfg)
</code></pre></div><h3>Unmarshalling PIML to Go Structs</h3><div class="relative my-8 group w-full"><div class="absolute top-0 left-0 w-full h-full bg-[#e5e5de] translate-x-1.5 translate-y-1.5 rounded-sm -z-10"></div><pre class="bg-[#1a1a1a] text-[#e5e5de] p-6 rounded-sm overflow-x-auto border-2 border-[#e5e5de]/20 font-mono text-sm shadow-sm leading-relaxed w-full"><code class="language-go" node="[object Object]">var cfg Config
err := piml.Unmarshal(pimlData, &cfg)
</code></pre></div></div></div></div><div class="p-8 border-b border-white/10 last:border-b-0 bg-[#0a0a0a]"><div class="flex flex-col mb-6"><span class="text-[10px] font-bold uppercase tracking-[0.3em] opacity-30 mb-1">High Performance</span><h3 class="text-xl font-instr-serif italic text-white/90 uppercase">Architecture</h3></div><div class="prose prose-invert prose-sm max-w-none prose-headings:font-instr-serif prose-headings:italic prose-headings:text-lg prose-p:font-instr-sans prose-p:text-white/60 prose-p:leading-relaxed"><div class=""><ul><li><strong>Spec Version</strong>: v1.1.0</li><li><strong>Serialization</strong>: Efficient reflection-based marshaling/unmarshaling.</li><li><strong>Reflection</strong>: Uses custom <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">piml</code> struct tags for mapping.</li><li><strong>Concurrency</strong>: Thread-safe operations for high-load environments.</li><li><strong>Standards</strong>: Native support for <code class="bg-[#1a1a1a] text-[#e5e5de] px-1.5 py-0.5 rounded font-mono text-sm font-bold mx-0.5 border border-[#e5e5de]/10" node="[object Object]">time.Time</code> and RFC3339Nano.</li></ul></div></div></div></div></div><div class="max-w-[1600px] mx-auto mt-8 flex justify-between items-center px-4 opacity-20 text-[10px] font-bold uppercase tracking-[0.5em]"><span>Digital Core / go-piml</span><span>© 2026 Fezcodex</span></div></div></main></div></div><div class="fixed bottom-0 left-0 w-full h-32 pointer-events-none z-[9999]"><div class="absolute bottom-2 flex flex-col items-center pointer-events-auto cursor-help" style="width:60px;transform:translateX(93.8949vw)"><div class="relative" style="transform:scaleX(-1)"><div class="w-10 h-10 flex items-center justify-center rounded-lg border-2 bg-[#050505] border-[#10B981]/40 text-[#10B981] shadow-lg" style="transform:translateY(-1.0314px) rotate(1.87426deg)"><svg fill="currentColor" height="24" viewBox="0 0 256 256" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M224,118.31V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V118.31h0A191.14,191.14,0,0,0,128,144,191.08,191.08,0,0,0,224,118.31Z" opacity="0.2"></path><path d="M104,112a8,8,0,0,1,8-8h32a8,8,0,0,1,0,16H112A8,8,0,0,1,104,112ZM232,72V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V72A16,16,0,0,1,40,56H80V48a24,24,0,0,1,24-24h48a24,24,0,0,1,24,24v8h40A16,16,0,0,1,232,72ZM96,56h64V48a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8ZM40,72v41.62A184.07,184.07,0,0,0,128,136a184,184,0,0,0,88-22.39V72ZM216,200V131.63A200.25,200.25,0,0,1,128,152a200.19,200.19,0,0,1-88-20.36V200H216Z"></path></svg><div class="absolute top-2 left-2 flex gap-3"><div class="w-1.5 h-1.5 rounded-full bg-current animate-pulse"></div><div class="w-1.5 h-1.5 rounded-full bg-current animate-pulse"></div></div></div><div class="flex justify-around mt-[-4px]"><div class="w-3 h-2 rounded-full bg-current opacity-50" style="color:#10b981;transform:translateY(-.96851px)"></div><div class="w-3 h-2 rounded-full bg-current opacity-50" style="color:#10b981;transform:translateY(-1.03149px)"></div></div></div></div></div><div class="fixed top-24 right-6 md:right-12 z-[100] pointer-events-none flex flex-col items-end gap-2"><div class="pointer-events-auto flex flex-col-reverse gap-3"></div></div></div></body></html>