-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: geodata reader for multi-platform compatibility #964
Conversation
@yuhan6665 may helped for your. |
common/geodata/decode.go
Outdated
@@ -30,7 +30,7 @@ var ( | |||
errCodeNotFound = errors.New("code not found") | |||
) | |||
|
|||
func emitBytes(f *os.File, code string) ([]byte, error) { | |||
func emitBytes(f io.ReadSeekCloser, code string) ([]byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实可以改成 io.ReadSeeker
,这样的话,就算是 buffer
或者 []byte
作为实参也可以直接读取并解码。
the new geodata loader may causes a slow or failed start with core.NewInstance.Start(), i need to try much times (to tap button) to start service. 😕 |
Refinements are on the way. |
this provides a method to oveeride fileReader for specified platform, such as gomobile for android. @Loyalsoldier @xiaokangwang