utils

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package utils provides common utilities for the use of other packages in oasdiff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref added in v1.30.0

func Deref[T any](ref *T) any

Deref returns the pointed-to value, or nil for a nil pointer. The any return keeps "absent" (nil) distinguishable from a zero value, which a plain *T dereference cannot express.

func ToKebabCase added in v1.30.0

func ToKebabCase(s string) string

ToKebabCase converts a camelCase name to kebab-case: maxItems becomes max-items. Characters other than ASCII uppercase pass through unchanged.

Types

type StringSet

type StringSet map[string]struct{}

StringSet is a set of string values

func StringSetFromSlice added in v1.11.10

func StringSetFromSlice(list []string) StringSet

StringSetFromSlice creates a StringSet from a string slice

func (StringSet) Add

func (stringSet StringSet) Add(s string)

func (StringSet) Contains

func (stringSet StringSet) Contains(s string) bool

func (StringSet) Copy

func (stringSet StringSet) Copy() StringSet

func (StringSet) Empty

func (stringSet StringSet) Empty() bool

Empty indicates whether a change was found in this element

func (StringSet) Equals

func (stringSet StringSet) Equals(other StringSet) bool

func (StringSet) Intersection

func (stringSet StringSet) Intersection(other StringSet) StringSet

func (StringSet) Minus

func (stringSet StringSet) Minus(other StringSet) StringSet

func (StringSet) Plus

func (stringSet StringSet) Plus(other StringSet) StringSet

func (StringSet) ToStringList

func (stringSet StringSet) ToStringList() []string

Jump to

Keyboard shortcuts

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