fieldmaskutil

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValidFields

func GetValidFields(paths []string, req interface{}) []string

GetValidFields return fields match with the value and definition of the given struct.

func IsValid

func IsValid(path string, req interface{}) (string, bool)

IsValid check whether the given path matchs with the defined paths in the given struct. It returns the normalized path follows snake_case format.

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase transform the given string to snake_case.

func TrimPrefix

func TrimPrefix(paths []string, prefix string) []string

TrimPrefix remove the prefix in the field mask.

Types

This section is empty.

Jump to

Keyboard shortcuts

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