gs_util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TopologicalSort added in v1.3.0

func TopologicalSort(items *list.List, fn GetBeforeItems) (*list.List, error)

TopologicalSort performs topological sorting using three lists (processing, toSort, sorted) to resolve dependencies and return a sorted list. The input `items` is a list of all items to be sorted, and `fn` determines dependencies.

Types

type GetBeforeItems

type GetBeforeItems func(items *list.List, current any) *list.List

GetBeforeItems is a function type that returns a list of items that the given current item depends on (must be processed before current item).

Jump to

Keyboard shortcuts

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