HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
go-yaml
yaml
Go2018–2025
go-yaml / yaml · Archived

yaml

YAML support for the Go language.

9Distinct people
10Mentions
0Explicit recommenders
7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

YAML support for the Go language.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2018-02-20 19:09:47 UTC to 2025-08-22 16:44:36 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC312

What Hacker News says

10 sources
Well, that's the problem I was highlighting - golang somehow decided to have the worst of both worlds: arbitrary domains in import paths and then putting the actual ref of the source code ... elsewhere import "gopkg.in/yaml.v3" // does *what* now? curl https://gopkg.in/yaml.v3?go-get=1 | grep github <meta name="go-source" content="gopkg.in/yaml.v3 _ https://github.com/go-yaml/yaml/tree/v3.0.1{/dir} https://github.com/go-yaml/yaml/blob/v3.0.1{/dir}/{file}#L{line}"> oh, ok :-/ I would presume only a go.mod entry would specify whether it really is v3.0.0 or v3.0.1 Also, for future generations, don't use that package https://github.com/go-yaml/yaml#this-project-is-unmaintained
In Go is still not good
I develop a library goccy/go-yaml for manipulating YAML in Go. Go already has a major library github.com/go-yaml/yaml, but I wanted a new library for various reasons, so I decided to make it myself from scratch. This library is a major library among Japanese Gophers as well as github.com/go-yaml/yaml. It is used by many companies and OSS. However, I would like more people outside of Japan to use it. Perhaps you're wondering why you need to use github.com/goccy/go-yaml instead of github.com/go-yaml/yaml. The reason is I wrote it in the README. Of course, github.com/go-yaml/yaml is a great library. But in many cases I also believe that github.com/goccy/go-yaml will also help your development. If you like it, please give it a try. And I would be grateful if you could give me feedback. Finaly, This library is developed in my personal time. I
Read the rest
develop many other OSSs, and depending on the development priority, I may not be able to immediately respond to feature requests. If you have a request for github.com/goccy/go-yaml, please consider sponsoring. I get new vitality thanks to the sponsors. I also strive to meet the needs of sponsors as much as possible.
In Show HN: A yet another useful YAML library for Go
I develop a library goccy/go-yaml for manipulating YAML in Go. Go already has a major library github.com/go-yaml/yaml, but I wanted a new library for various reasons, so I decided to make it myself from scratch. This library is a major library among Japanese Gophers as well as github.com/go-yaml/yaml. It is used by many companies and OSS. However, I would like more people outside of Japan to use it. Perhaps you're wondering why you need to use github.com/goccy/go-yaml instead of github.com/go-yaml/yaml. The reason is I wrote it in the README. Of course, github.com/go-yaml/yaml is a great library. But in many cases I also believe that github.com/goccy/go-yaml will also help your development. If you like it, please give it a try. And I would be grateful if you could give me feedback. Finaly, This library is developed in my personal time. I
Read the rest
develop many other OSSs, and depending on the development priority, I may not be able to immediately respond to feature requests. If you have a request for github.com/goccy/go-yaml, please consider sponsoring. I get new vitality thanks to the sponsors. I also strive to meet the needs of sponsors as much as possible.
In A library to help everyone working with YAML in Go
I’m not familiar with go, would this persist to other people attempting to install the package? The issue I’ve seen is: https://github.com/go-yaml/yaml/issues/558 > Please do follow semver as it's a nightmare for us to manage particularly using go module (you can't stick to a particular version). And of course everybody’s idea of a breaking change is different, so this idea that you can’t install a particular version seems unworkable.
In A one-line package broke `npm create-react-app`
"ruleguard parses gorules (e.g. rules.go) during the start to load the rule set. Loaded rules are then used to check the specified targets (Go files, packages). The rules.go file itself is never compiled, nor executed." I understand why it's doing this (in terms of being able to use the ast parser), but it's a bit weird. I'm "writing in Go", but I (assume I) can't use loops, conditionals, actually run code, etc. That's a weird affordance [1]. I'd suggest looking at the data structures coming out of the parse of the file, and considering whether or not you can offer a JSON/YAML (de)serialization of that instead, and whether or not that might be an acceptable enough format. We still get "tooling" that can deal with it, but JSON/YAML files don't contain the promise of being Go code, so the affordances line up with expectations better. (That'
Read the rest
s cleanly true of JSON. YAML nominally has some extensions that make that a bit less clear. Then again, you may find it helpful to let the extensions do their thing; I haven't checked but go-yaml says it supports map merging [3], which may give you a nice little bit of abstraction for the users that costs you zero to implement.) In the complete other direction, I also would be fine with mynegation's suggestion of actually running it, and letting it be defined by a data structure the code returns. Then I do really have full Go power, and the affordances match capabilities again. (I think I may actually have a slight preference for the JSON/YAML case; it just feels more like something that can be integrated into CI better, even though there's nothing technically stopping you from executing Go code. Still, it's definitely easy both technically and conceptually to say "I'm running this executable with this input configuration file across my code", where as "I'm going to compile this specially for the CI process" is just... cognitively larger.) [1]: https://en.wikipedia.org/wiki/Affordance#As_perceived_action... [2]: https://github.com/go-yaml/yaml [3]: https://yaml.org/type/merge.html
In Show HN: CodeQL-Like Analyzer for Go
> I think it's really going to confuse users to have the major version in both places. What does it mean if I my code has: after reading the proposal, my understanding is: the 'import "github.com/go-yaml/yaml/v2"' directive would lead to installing the oldest version of yaml 2.x that is supported by your other dependencies. meanwhile, the go.mod file would mean that any dependencies that use the incompatible yaml 1.x library, would lead you you installing the oldest 1.x version after 1.5.2 which would then be used all dependencies that import the 1.x version > No, I think newest (stable version) is the right default. Every package manager in the world works this way and the odds that they all got this wrong are slim at this point. Doing this is meant to allow reproducible builds without requiring the use of a lock file. As to why they don
Read the rest
't want a lock file... that isn't really addressed in the article. Lock files do seem like the most sane way to provide truly reproducible builds (that aren't dependent on the repo tags no changing since they are usually locked to a specific commit hash). I think the decision to avoid a lock file is a bad one and certainly needs to be justified. > I think this is confusing older versions and lower. You could, I suppose, build a package manager that forbids publishing a version number lower than any previously published version of the package and thus declare this to be true by fiat. I agree, I also think they they meant to say "minimal minor version" since major version have different import paths and are BC incompatible. Ideally, "prefer oldest / prefer newest" should be something that can be configured per requirement in the go.mod file so that people who don't care about reproducibility don't have to go through and bump their minimum versions every time any dependency has a new release. Making this dependent on using a flag every time you run 'vgo get' is silly and doesn't allow you to do this for some packages and not others without having to write your own script to make a bunch of 'vgo get' invocations. > I think preferring minimum versions also has negative practical consequences. Package maintainers have an easier job if most of their users are on similar, recent versions of the package's own dependencies. Ideally, the first step you take when you encounter a bug with a library would be to check to see if a more recent version of the library fixes the bug. In practice, I don't know how many people would fail to do this before filing a bug report.
In Go += Package Versioning
I'm going to comment mostly on the parts of the proposal that I think are wrong, but don't take this to be an overall negative response. I'm excited to see smart folks working on this, and package management is a really hard problem. There are no silver bullets to code reuse. Context for those who don't know: I along with Natalie Weizenbaum wrote pub[1], the package manager used for Dart. > Instead of concluding from Hyrum's law that semantic versioning is impossible, I conclude that builds should be careful to use exactly the same versions of each dependency that the author did, unless forced to do otherwise. That is, builds should default to being as reproducible as possible. Right on. Another way to state this is: Changing the version of a dependency should be an explicit user action, and not an implicit side effect of installing depen
Read the rest
dencies. import "github.com/go-yaml/yaml/v2" > Creating v2.0.0, which in semantic versioning denotes a major break, therefore creates a new package with a new import path, as required by import compatibility. Because each major version has a different import path, a given Go executable might contain one of each major version. This is expected and desirable. It keeps programs building and allows parts of a very large program to update from v1 to v2 independently. It took me several readings to realize that you encode the major version requirement both in the import string and in the module requirements. The former lets you have multiple copies of the "same" module in your app at different major versions. The latter lets you express more precise version requirements like "I need at least 2.3, not just 2.anything". I think it's really going to confuse users to have the major version in both places. What does it mean if I my code has: import "github.com/go-yaml/yaml/v2" But my go.mod has: require ( "github.com/go-yaml/yaml" v1.5.2 ) I don't know if the goal of this is to avoid lockfiles, or to allow multiple versions of the same package to co-exist, but I think it's going to end up a confusing solution that doesn't cleanly solve any problem. For what it's worth, Dart does not let you have two versions of the same package in your application, even different major versions. This restriction does cause real pain, but it doesn't appear to be insurmountable. Most of the pain seems to be in the performance issues over-constrained dependencies caused in our old version solver and not in the user's code itself. In almost all cases, I think there is a single version of a given package that would work in practice, and I think it's confusing for users to have an application that has multiple versions of what they think of as the "same" package inside it. This may be less of an issue in Go because it's structurally typed, but in Dart you could get weird errors like "Expected a Foo but got a Foo" because those "Foo"s are actually from different versions of "foo". Requiring a single version avoids that. > I believe this is the wrong default, for two important reasons. First, the meaning of “newest allowed version” can change due to external events, namely new versions being published. Maybe tonight someone will introduce a new version of some dependency, and then tomorrow the same sequence of commands you ran today would produce a different result. No, I think newest (stable version) is the right default. Every package manager in the world works this way and the odds that they all got this wrong are slim at this point. At the point in time that the user is explicitly choosing to mess with their dependencies, picking the current state of the art right then is likely what the user wants. If I'm starting a brand new from scratch Ruby on Rails application today, in 2017, there is no reason it should default to having me use Rails 1.0 from 2005. Every version of the package is new to me because I'm changing my dependencies right now. Might as well give me the version that gets me as up-to-date as possible because once I start building on top of it, it gets increasingly hard to change it. Encouraging me to build my app in terms of an API that may already be quite out of date seems perverse. > This proposal takes a different approach, which I call minimal version selection. It defaults to using the oldest allowed version of every package involved in the build. This decision does not change from today to tomorrow, because no older version will be published. I think this is confusing older versions and lower. You could, I suppose, build a package manager that forbids publishing a version number lower than any previously published version of the package and thus declare this to be true by fiat. But, in practice, I don't think most package managers do this. In particular, it's fairly common for a package to have multiple simultaneously supported major or minor versions. For example, Python supports both the 2.x and 3.x lines. 2.7 was released two years after 3.0. When a security issue is found in a package, it's common to see point releases get released for older major/minor versions. So if foo has 1.1.0 and 1.2.0 out today and a security bug that affects both is found, the maintainers will likely release 1.1.1 and 1.2.1. This means 1.1.1 is released later than 1.2.0. I think preferring minimum versions also has negative practical consequences. Package maintainers have an easier job if most of their users are on similar, recent versions of the package's own dependencies. It's no fun getting bug reports from users who are using your code with ancient versions of its dependencies. As a maintainer, you're spending most of your time ensuring your code still works with the latest so have your users in a different universe makes it harder to be in sync with them. Look at, for example, how much more painful Android development is compared to iOS because Android has such a longer tail of versions still in the wild that app developers need to deal with. If you do minimum version selection, my hunch is that package maintainers will just constantly ship new versions of their packages that bump the minimum dependencies to forcibly drag their users forword. Or they'll simply state that they don't support older versions beyond some point in time even when the package's own manifest states that it technically does. There is a real fundamental tension here. Users — once they have their app working — generally want stability and reproducibility. No surprises when they aren't opting into them. But the maintainers of the packages those users rely on want all of their users in the same bucket on the latest and greatest, not smeared out over a long list of configurations to support. A good package manager will balance those competing aims to foster a healthy ecosystem, not just pick one or the other. [1]: https://pub.dartlang.org/
In Go += Package Versioning

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.