sort

package
Version: v0.0.0-...-49e55dd Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package sort contains the implementation of the sort plugin, which generates the deriveSort function.

The deriveSort function is useful for deterministically ranging over maps when used with deriveKeys. deriveSort supports only the types that deriveCompare supports, since it uses it for sorting.

Example: https://github.com/awalterschulze/goderive/tree/master/example/plugin/sort

Even though sort returns a list it also mutates the input list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New is a constructor for the sort code generator. This generator should be reconstructed for each package.

func NewPlugin

func NewPlugin() derive.Plugin

NewPlugin creates a new sort plugin. This function returns the plugin name, default prefix and a constructor for the sort code generator.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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