encoding

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package encoding provides safe, atomic utility methods for encoding/saving to disk and loading from disk/decoding of data in common formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAndUnmarshalProtobuf

func LoadAndUnmarshalProtobuf(path string, message proto.Message) error

LoadAndUnmarshalProtobuf loads data from the specified path and decodes it into the specified Protocol Buffers message.

func LoadAndUnmarshalTOML

func LoadAndUnmarshalTOML(path string, value interface{}) error

LoadAndUnmarshalTOML loads data from the specified path and decodes it into the specified structure.

func MarshalAndSaveProtobuf

func MarshalAndSaveProtobuf(path string, message proto.Message) error

MarshalAndSaveProtobuf marshals the specified Protocol Buffers message and saves it to the specified path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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