base

package
v0.5.25 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: BSD-3-Clause Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

base

A collection of base infrastructure packages that serve as a base for the main Cogent Core packages. They are placed in this directory to avoid cluttering the root directory with small packages that are not the main focus of Cogent Core. In a sense, these packages are extensions of the Go standard library that could have been plausibly included there.

Documentation

Overview

Package base contains a collection of base infrastructure packages that serve as a base for the main Cogent Core packages.

Directories

Path Synopsis
Package auth provides a system for identifying and authenticating users through third party cloud systems in Cogent Core apps.
Package auth provides a system for identifying and authenticating users through third party cloud systems in Cogent Core apps.
examples/basic command
examples/scopes command
Package bools provides functions and interfaces for interacting with bool values.
Package bools provides functions and interfaces for interacting with bool values.
Package datasize provides a data size type and constants.
Package datasize provides a data size type and constants.
Package elide provides basic text eliding functions.
Package elide provides basic text eliding functions.
Package errors provides a set of error handling helpers, extending the standard library errors package.
Package errors provides a set of error handling helpers, extending the standard library errors package.
Package exec provides an easy way to execute commands, improving the ease-of-use and error handling of the standard library os/exec package.
Package exec provides an easy way to execute commands, improving the ease-of-use and error handling of the standard library os/exec package.
Package fileinfo manages file information and categorizes file types; it is the single, consolidated place where file info, mimetypes, and filetypes are managed in Cogent Core.
Package fileinfo manages file information and categorizes file types; it is the single, consolidated place where file info, mimetypes, and filetypes are managed in Cogent Core.
apps
Package apps provides access to the apps of the system that open files: the apps that can open a file, its default app, opening it with another app, and changing the default app for its type of file, using the facilities of each platform: NSWorkspace on macOS, and the freedesktop (XDG) desktop entries and mimeapps.list files on Linux and other unix systems.
Package apps provides access to the apps of the system that open files: the apps that can open a file, its default app, opening it with another app, and changing the default app for its type of file, using the facilities of each platform: NSWorkspace on macOS, and the freedesktop (XDG) desktop entries and mimeapps.list files on Linux and other unix systems.
mimedata
Package mimedata defines MIME data support used in clipboard and drag-and-drop functions in the Cogent Core GUI.
Package mimedata defines MIME data support used in clipboard and drag-and-drop functions in the Cogent Core GUI.
Package fsx provides various utility functions for dealing with filesystems.
Package fsx provides various utility functions for dealing with filesystems.
Package generate provides utilities for building code generators in Go.
Package generate provides utilities for building code generators in Go.
Package github is a client of the GitHub REST API for the git data of repositories: branches, commits, trees and files, as for storing and syncing the files of an app in a repository.
Package github is a client of the GitHub REST API for the git data of repositories: branches, commits, trees and files, as for storing and syncing the files of an app in a repository.
githubtest
Package githubtest is a test server of the parts of the GitHub REST API that package github uses, with repositories in memory.
Package githubtest is a test server of the parts of the GitHub REST API that package github uses, with repositories in memory.
Package goscript provides support for running Cogent Core code compiled to JavaScript by goscript (https://github.com/s4wave/goscript), which is used for the js platform.
Package goscript provides support for running Cogent Core code compiled to JavaScript by goscript (https://github.com/s4wave/goscript), which is used for the js platform.
gsbench
Package gsbench has benchmarks of basic Go language operations, used to compare the performance of code compiled to JavaScript by goscript with native Go code (see the goscript package).
Package gsbench has benchmarks of basic Go language operations, used to compare the performance of code compiled to JavaScript by goscript with native Go code (see the goscript package).
Package indent provides indentation generation methods.
Package indent provides indentation generation methods.
iox
Package iox provides boilerplate wrapper functions for the Go standard io functions to Read, Open, Write, and Save, with implementations for commonly used encoding formats.
Package iox provides boilerplate wrapper functions for the Go standard io functions to Read, Open, Write, and Save, with implementations for commonly used encoding formats.
gzipx
Package gzipx provides a convenience wrapper for gzip encoding for reader and writer.
Package gzipx provides a convenience wrapper for gzip encoding for reader and writer.
tomlx
Package tomlx provides functions for reading and writing TOML.
Package tomlx provides functions for reading and writing TOML.
Package jscp provides functions for copying data to JavaScript
Package jscp provides functions for copying data to JavaScript
Package keylist implements an ordered list (slice) of items, with a map from a key (e.g., names) to indexes, to support fast lookup by name.
Package keylist implements an ordered list (slice) of items, with a map from a key (e.g., names) to indexes, to support fast lookup by name.
Package logx implements structured log handling and provides global log and print verbosity and color options.
Package logx implements structured log handling and provides global log and print verbosity and color options.
Package mergefs provides support for merging multiple filesystems together.
Package mergefs provides support for merging multiple filesystems together.
Package metadata provides a map of named any elements with generic support for type-safe Get and nil-safe Set.
Package metadata provides a map of named any elements with generic support for type-safe Get and nil-safe Set.
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Package nptime provides a non-pointer version of the time.Time struct that does not have the location pointer information that time.Time has, which is more efficient from a memory management perspective, in cases where you have a lot of time values being kept: https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Package option provides optional (nullable) types.
Package option provides optional (nullable) types.
package ordmap implements an ordered map that retains the order of items added to a slice, while also providing fast key-based map lookup of items, using the Go 1.18 generics system.
package ordmap implements an ordered map that retains the order of items added to a slice, while also providing fast key-based map lookup of items, using the Go 1.18 generics system.
Package plan provides an efficient mechanism for updating a slice to contain a target list of elements, generating minimal edits to modify the current slice contents to match the target.
Package plan provides an efficient mechanism for updating a slice to contain a target list of elements, generating minimal edits to modify the current slice contents to match the target.
Package profile provides basic but effective profiling of targeted functions or code sections, which can often be more informative than generic cpu profiling.
Package profile provides basic but effective profiling of targeted functions or code sections, which can often be more informative than generic cpu profiling.
Package reflectx provides a collection of helpers for the reflect package in the Go standard library.
Package reflectx provides a collection of helpers for the reflect package in the Go standard library.
Package slicesx provides additional slice functions beyond those in the standard slices package.
Package slicesx provides additional slice functions beyond those in the standard slices package.
sshtest
Package sshtest provides an SSH server for testing code that uses cogentcore.org/core/base/sshclient, running in the test process on the local host: it runs commands with sh in its root directory, which is the home directory of the remote host, and serves SFTP.
Package sshtest provides an SSH server for testing code that uses cogentcore.org/core/base/sshclient, running in the test process on the local host: it runs commands with sh in its root directory, which is the home directory of the remote host, and serves SFTP.
Package stack provides a generic stack implementation.
Package stack provides a generic stack implementation.
Package strcase provides functions for manipulating the case of strings (CamelCase, kebab-case, snake_case, Sentence case, etc).
Package strcase provides functions for manipulating the case of strings (CamelCase, kebab-case, snake_case, Sentence case, etc).
Package stringsx provides additional string functions beyond those in the standard strings package.
Package stringsx provides additional string functions beyond those in the standard strings package.
Package tiered provides a type for a tiered set of objects.
Package tiered provides a type for a tiered set of objects.
Package timer provides a simple wall-clock duration timer based on standard time.
Package timer provides a simple wall-clock duration timer based on standard time.
Package tolassert provides functions for asserting the equality of numbers with tolerance (in other words, it checks whether numbers are about equal).
Package tolassert provides functions for asserting the equality of numbers with tolerance (in other words, it checks whether numbers are about equal).
Package vcs provides a version control system interface for git and Subversion repositories, with file status information and operations, using the git and svn commands.
Package vcs provides a version control system interface for git and Subversion repositories, with file status information and operations, using the git and svn commands.
Package websocket provides a cross-platform WebSocket client implementation.
Package websocket provides a cross-platform WebSocket client implementation.
example/client command
example/server command

Jump to

Keyboard shortcuts

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