ioutils

package
v0.0.0-...-94a1697 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

This package exists to de-duplicate code used in testing and code generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderGoTemplate

func RenderGoTemplate(output string, tpl string, data any) error

Renders a single go template to output.

  • If output file does not exist it is created.
  • If output file exists, it is overwritten.
  • Rendered output is formatted with gofmt.

func WriteBlob

func WriteBlob(output string, blob []byte) error

WriteBlob writes given binary blob to file.

  • If output file does not exist it is created.
  • If output file exists, it is overwritten.

func WritePublicKey

func WritePublicKey(output string, pub crypto.PublicKey) error

Given public key write to output file.

  • If output file does not exist it is created.
  • If output file exists, it is overwritten.

Types

This section is empty.

Jump to

Keyboard shortcuts

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