Comments (4)
I think may be by some way we can automate have a hash version of an empty struct, then we can use it as version hash, and this new implementation should store this hash to the cached data. Anytime, we can generate a new hash for current struct and compare with the hash of struct which is storing in cache. So we can conclude to clear cache or just keep it by the result of comparison.
from cointop.
How does golang hashing (of struct instances) work? Would the hash change if a field changed name, but not format?
Could we hash the type object? Or use reflection to generate a unique description of the struct, maybe hashing that, and compare that?
from cointop.
Oh, sorry because that was a draft thought.
I just tried and seems it could use for both field name and field type, by reflection. Please play with it: https://goplay.tools/snippet/95AlZD8EVmA
The idea of collecting field name came from here: https://stackoverflow.com/a/61465755/1155318
from cointop.
Closed by #302
from cointop.
Related Issues (20)
- readme error? HOT 3
- Support coins that are very far down the list HOT 5
- Sync portfolio from API provider (coingecko, coinmarketcap) HOT 1
- Charts do not work with coinmarketcap HOT 1
- Fix Coin ID for Coinmarketcap
- Reduce amount of traffic to coinmarketcap backend? HOT 1
- Open custom link with a symbol HOT 5
- Refactor config load/save code to be simpler and more declarative HOT 2
- Can't delete Ethereum Cash from my portfolio HOT 8
- ctrl+c doesn't work as expected (to exit app) on Windows/Linux HOT 3
- (Request) Could it be possible to fetch categories data from coingecko API and display it on cointop? HOT 5
- Portfolio sum all holdings HOT 4
- BUG: configuration file is corrupted if multiple instances of cointop are run at once. HOT 2
- FEAT: Support The Open Network (Telegram Open Network) HOT 2
- Missing font/chars in chart HOT 2
- Run multiple sorts HOT 1
- unable to run in Tmux HOT 1
- Amazing project
- Switching back to main view from Portfolio view corrupts the displayed coins in the main list
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 cointop.