pbn

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

README

Go-PBN Parser Library

The GO-PBN Parser Library is a specialized software tool designed for reading and interpreting data in Portable Bridge Notation (PBN) format.

Usage

go get "git.sr.ht/~klahr/go-pbn"
package main

import (
	"fmt"
	"os"

	"git.sr.ht/~klahr/go-pbn"
)

func main() {
	if data, err := os.ReadFile("my-file.pbn"); err != nil {
		panic(err)
	} else {
		if m, err := pbn.Import(data); err != nil {
			for _, g := range m.Games {
				fmt.Println(g.Event) // Print event name.
				// ...
			}
		}
	}
}

Documentation

Overview

SPDX-License-Identifier: GPL-3.0-only

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(data []byte) (*models.PBN, error)

Types

This section is empty.

Directories

Path Synopsis
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only
SPDX-License-Identifier: GPL-3.0-only

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL