utils

package
v0.0.0-...-93937e9 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package utils holds the implementation for common utility functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileNameWithoutExtension

func FileNameWithoutExtension(path string) string

FileNameWithoutExtension returns the file name without the extension ex: when provided the path "/foo/hello.world" it returns "hello"

func FindAPIDefinitionVersion

func FindAPIDefinitionVersion(jsn []byte) string

FindAPIDefinitionVersion finds the API definition version for the given json content.

func ToJSON

func ToJSON(data []byte) ([]byte, error)

ToJSON converts a single YAML document into a JSON document or returns an error. If the document appears to be JSON the YAML decoding path is not used. If the input file is json, it would be returned as it is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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