Open Iovesophy opened 3 years ago
see this info https://go.dev/blog/package-names
Don’t use a single package for all your APIs. Many well-intentioned programmers put all the interfaces exposed by their program into a single package named api, types, or interfaces, thinking it makes it easier to find the entry points to their code base. This is a mistake. Such packages suffer from the same problems as those named util or common, growing without bound, providing no guidance to users, accumulating dependencies, and colliding with other imports. Break them up, perhaps using directories to separate public packages from implementation.
perhaps using directories to separate public packages from implementation.
so should separate directory of any yubikey control function.
All advice are going to Project board Thank you for your comment.
memo I thought it would be better to define an interface , this is syntax of golang. It will be more convenient if you can easily build with makefiles or anything else helper tools. When detecting multiple hardware tokens, it would be nice to be able to choose which hardware to authenticate on , so should implement selector interface. and I thought it would be better if there was a way to recover files in case of hardware failure, and it would be nice if users could choose that.