Git Product home page Git Product logo

Comments (6)

dosubot avatar dosubot commented on August 24, 2024 2

🤖

Hi, @hoslo,

I'm helping the Kratos team manage their backlog and am marking this issue as stale. The problem reported by you involves a panic when loading the Apollo YAML config in a Kratos project. There has been a debate in the comments about whether this is a bug or a naming convention issue, and a suggested workaround by another user to define a separate codec for yml.

Could you please let us know if this issue is still relevant to the latest version of the Kratos repository? If it is, please comment on the issue to let the Kratos team know. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!

from kratos.

hoslo avatar hoslo commented on August 24, 2024 1

The two codes are exactly the same, only the package with the same name does not look very halal 😂

maybe we should put them in one package (yaml)?

from kratos.

shenqidebaozi avatar shenqidebaozi commented on August 24, 2024

I don't think this is a bug, yaml or yml is just a difference in declaring suffixes. If we add a separate yml encoding package for yml, I think it would be strange

from kratos.

hoslo avatar hoslo commented on August 24, 2024

I don't think this is a bug, yaml or yml is just a difference in declaring suffixes. If we add a separate yml encoding package for yml, I think it would be strange

how you think should to solve this question?

from kratos.

shenqidebaozi avatar shenqidebaozi commented on August 24, 2024

The two codes are exactly the same, only the package with the same name does not look very halal 😂

from kratos.

fighterhit avatar fighterhit commented on August 24, 2024

Yes, I ran into this problem early on and I had to define codec for yml like below, but I think kratos developers should realize that yaml and yml are the same and should provide consistent codec.

encoding.RegisterCodec(codec{})

type codec struct{}

func (codec) Marshal(v interface{}) ([]byte, error) {
	return yaml.Marshal(v)
}

func (codec) Unmarshal(data []byte, v interface{}) error {
	return yaml.Unmarshal(data, v)
}

func (codec) Name() string {
	return "yml"
}

from kratos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.