Comments (6)
🤖
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.
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.
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.
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.
The two codes are exactly the same, only the package with the same name does not look very halal 😂
from kratos.
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)
- Kratos middleware seems to only apply to unary gRPC operations HOT 7
- t
- [Question] About the current p2c algorithm HOT 1
- bug in Quick Start HOT 1
- [Question]how can i catch issue when i use config hot reload with a mismatch type
- 使用北极星作为服务发现时,在注册多个grpc client时,启动报错:concurrent map iteration and map write HOT 4
- [Question]how to get all router HOT 1
- GRPC MaxSendMsgSize MaxRecvMsgSize setting HOT 1
- [Question] Error: no_available_node HOT 13
- [Question] After creating a new service, the grpc test is normal, but when requesting bff through http, the bff layer does not initiate a grpc call to the business layer and returns DeadlineExceeded. Which part should be checked? HOT 1
- Whitelist: selector middleware doesn't work for grpc HOT 1
- [Question] Next release date for kratos? HOT 1
- kratos proto client api/helloworld/v2 fail? HOT 1
- [Question] HOT 2
- [Feature]go-kratos 的ResponseEncoder 可以根据不同的路由,设置不同的encoder吗 HOT 2
- [Feature] Add convenient functions to return official codec in encoding package. HOT 5
- [Question] Whether the k8s Headless service supports namespaces
- kratos new helloworld - does not work
- [Question] How to define 4xx, 5xx response codes in openapi spec generate from proto definitions
- [Question]In the streaming mode of grpc, docking with jwt failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kratos.