🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/ennesuysal/yaml-parser

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ennesuysal/yaml-parser

v0.0.0-20210425175049-bd3a93a3761a
Source
Go
Version published
Created
Source

Ordered Yaml Parser

Usage:

Download Package

go get github.com/ennesuysal/yaml-parser

Import Package to Your Project

import "yaml-parser"

Create an instance

yp := yamlParser.NewYamlParser("test.yaml")

Get Value

n := yp.Tree.GetNodeValue("build", "docker", 0)
value := n.Value

Set Value

yp.Tree.SetNodeValue("newValue", "build", "docker", 0)

Write to file

yp.Tree.WriteFile("output.yaml")

FAQs

Package last updated on 25 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts