compare

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package compare provides basic functions to compare JSON object and array. Currently we use gjson to store the JSON data. Please check tidwall/gjson.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Array

func Array(field string, expect, actul []gjson.Result) error

Array compares two JSON Array.

func Element

func Element(field string, expect, actul gjson.Result) error

Element compares two JSON Element.

func JoinErr

func JoinErr(errs ...error) error

JoinErr returns an error that warp the given errors.

func Object

func Object(field string, expect, actul map[string]gjson.Result) error

Object compares two JSON object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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