profile
viewpoint

linkedin/fossor 161

A plugin-oriented tool for automating the investigation of broken hosts and services.

linkedin/asciietch 127

A graphing library with the goal of making it simple to graphs using ascii characters.

scallister/cluster-mux 2

Helper script for sshing and controlling several hosts while in a tmux session.

scallister/yaml 1

YAML support for the Go language.

scallister/asciietch 0

A graphing library with the goal of making it simple to graphs using ascii characters.

scallister/fossor 0

A plugin-oriented tool for automating the investigation of broken hosts and services.

scallister/kube-plex 0

Scalable Plex Media Server on Kubernetes -- dispatch transcode jobs as pods on your cluster!

scallister/prompter 0

golang utility for easy prompting

scallister/sumologic-terraform-provider 0

Terraform provider for Sumo Logic.

scallister/twitch-dl 0

CLI tool for downloading videos from Twitch.

startedjubnzv/go-tmux

started time in 2 months

startedredredgroovy/go-ffi-demo

started time in 2 months

push eventscallister/wemowatch

Steven Callister

commit sha b961cea58fd68e36a89f76e2289e2645389fd977

Updating README

view details

Steven Callister

commit sha f27d368c47c9aa5f22ab6ed659f1eb6d27a95e19

Cleaning up already running llogic

view details

push time in 2 months

push eventscallister/wemowatch

Steven Callister

commit sha b35ff37fbc73210fe84095637ac4542e486a0368

Switching wemowatch to zerlog

view details

push time in 2 months

pull request commentgo-yaml/yaml

Adding EncodeWithComments function

@niemeyer sure, just opened an issue here https://github.com/go-yaml/yaml/issues/653.

Totally agree on ideally not needing a new function for this. Thanks for taking a look! 😃

scallister

comment created time in 2 months

issue openedgo-yaml/yaml

node.Encode dropping comments

Opened a PR for this https://github.com/go-yaml/yaml/pull/652, but am posting it here as well by request 👍 . Thanks for taking a look at this 😃.

Issue node.Encode() does not add comments by default. This is because the parser has p.textless = true set which causes this if clause to be skipped and not add comments:

	if !p.textless {
		n.Line = p.event.start_mark.line + 1
		n.Column = p.event.start_mark.column + 1
		n.HeadComment = string(p.event.head_comment)
		n.LineComment = string(p.event.line_comment)
		n.FootComment = string(p.event.foot_comment)
	}

created time in 2 months

push eventscallister/yaml

Steven Callister

commit sha 552ccb33ca71bd91338285000bf4e05236e13029

Updating go.mod for my fork

view details

push time in 2 months

push eventscallister/yaml

push time in 2 months

push eventscallister/yaml

Steven Callister

commit sha b871c548a023f1b3c79420a40399b53108fc7bbb

Updating go.mod

view details

push time in 2 months

pull request commentgo-yaml/yaml

Adding EncodeWithComments function

Updated request from proper branch is here https://github.com/go-yaml/yaml/pull/652

scallister

comment created time in 2 months

PR opened go-yaml/yaml

Adding EncodeWithComments function

node.Encode() does not add comments by default. This is because the parser has p.textless = true set which causes this if clause to be skipped and not add comments:

	if !p.textless {
		n.Line = p.event.start_mark.line + 1
		n.Column = p.event.start_mark.column + 1
		n.HeadComment = string(p.event.head_comment)
		n.LineComment = string(p.event.line_comment)
		n.FootComment = string(p.event.foot_comment)
	}

Is there a better way to update values in yaml.Node that I should be using instead of node.Encode?

If node.Encode is the correct function to use, there are multiple ways to fix this to allow comments to remain. I've included what I'm using in my fork but happy to switch to another strategy.

IE:

  • Passing in an options struct to control textless (and other future options if a need arises)
  • Moving functionality from Encode to a common encode that both Encode and EncodeWithComments can both reference. This would keep EncodeWithComments from duplicating most of the lines from the existing Encode function.
+17 -0

0 comment

1 changed file

pr created time in 2 months

PR closed go-yaml/yaml

Adding EncodeWithComments function

node.Encode() does not add comments by default. This is because the parser has p.textless = true set which causes this if clause to be skipped and not add comments:

	if !p.textless {
		n.Line = p.event.start_mark.line + 1
		n.Column = p.event.start_mark.column + 1
		n.HeadComment = string(p.event.head_comment)
		n.LineComment = string(p.event.line_comment)
		n.FootComment = string(p.event.foot_comment)
	}

Is there a better way to update values in yaml.Node that I should be using instead of node.Encode?

If node.Encode is the correct function to use, there are multiple ways to fix this to allow comments to remain. I've included what I'm using in my fork but happy to switch to another strategy.

IE:

  • Passing in an options struct to control textless (and other future options if a need arises)
  • Moving functionality from Encode to a common encode that both Encode and EncodeWithComments can both reference. This would keep EncodeWithComments from duplicating most of the lines from the existing Encode function.
+18 -1

1 comment

2 changed files

scallister

pr closed time in 2 months

pull request commentgo-yaml/yaml

Adding EncodeWithComments function

Closing and reopening from a different branch so this does not include my go.mod change.

scallister

comment created time in 2 months

create barnchscallister/yaml

branch : v3-add_comments_to_encode

created branch time in 2 months

create barnchscallister/yaml

branch : scallister/add_comments_to_encode

created branch time in 2 months

push eventscallister/yaml

Steven Callister

commit sha e6f5ff5b8eef433d4353f98bd71769e1c4ad4c0e

Updating go.mod for my fork

view details

push time in 2 months

PR opened go-yaml/yaml

Adding EncodeWithComments function

node.Encode() does not add comments by default. This is because the parser p.textless = true is set to true which causes this if clause to not add comments:

	if !p.textless {
		n.Line = p.event.start_mark.line + 1
		n.Column = p.event.start_mark.column + 1
		n.HeadComment = string(p.event.head_comment)
		n.LineComment = string(p.event.line_comment)
		n.FootComment = string(p.event.foot_comment)
	}

Is there a better way to update values in yaml.Node that I should be using instead of node.Encode?

If node.Encode is the correct function to use, there are multiple ways to allow comments to remain. I've included what I'm using in my fork but happy to switch to another strategy.

IE:

  • Passing in an options struct to control textless (and other future options if a need arises)
  • Moving functionality from Encode to a common encode that both Encode and EncodeWithComments can both reference. This would keep EncodeWithComments from duplicating most of the lines from the existing Encode function.
+17 -0

0 comment

1 changed file

pr created time in 2 months

push eventscallister/yaml

Steven Callister

commit sha 5799a6cfb673e9e6325648a13acfe6928d40071d

Adding EncodeWithComments function

view details

push time in 2 months

push eventscallister/yaml

Steven Callister

commit sha 2d2cbe01a1135cca518fb536d4a6cb0d70ee5152

Adding EncodeWithComments function

view details

push time in 2 months

fork scallister/yaml

YAML support for the Go language.

fork in 2 months

CommitCommentEvent

push eventscallister/wemowatch

Steven Callister

commit sha 8fdee64cbd69d0dd1ac29916a2c31a536cfc424e

Update README.md

view details

push time in 2 months

startedmengzhuo/yaml-to-go

started time in 3 months

fork scallister/kube-plex

Scalable Plex Media Server on Kubernetes -- dispatch transcode jobs as pods on your cluster!

fork in 3 months

startedsandipb/zap-examples

started time in 3 months

more