conversion-gen

command
v0.18.2-0...-866293b Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

conversion-gen is a tool for auto-generating Conversion functions.

Given a list of input directories, it will scan for "peer" packages and generate functions that efficiently convert between same-name types in each package. For any pair of types that has a

`Convert_<pkg1>_<type>_To_<pkg2>_<Type()`

function (and its reciprocal), it will simply call that. use standard value assignment whenever possible. The resulting file will be stored in the same directory as the processed source package.

Generation is governed by comment tags in the source. Any package may request Conversion generation by including a comment in the file-comments of one file, of the form:

// +k8s:conversion-gen=<import-path-of-peer-package>

When generating for a package, individual types or fields of structs may opt out of Conversion generation by specifying a comment on the of the form:

// +k8s:conversion-gen=false

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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