gossamer
gossamer copied to clipboard
Implement Go Standard Package folder structure
Issue summary
- Many go projects with external packages utilize the
pkgandinternalroot level folders. Issue #1072 is looking to move SCALE into it's own package for external use. Migratingscaleto thepkgfolder is a nice compromise and we can always move it out into it's own repo afterwards. - Rename
libtointernal. The go compiler enforces that external applications that import packages will not be able to import packages that stored in aninternalfolder. - Create the
pkgfolder with the intention of putting the finished package from #1072 into thepkgfolder. - Audit the existing packages in
liband see which other packages we'd like to put inpkg.
Other information and links
- https://github.com/golang-standards/project-layout
-
lib/trie/proof's trie proof verification -
lib/trie'sNewEmptyTrie()function and triePut,Hash,Delete, methods are used here -
pkg/scaleis used by https://github.com/w3f/polkadot-tests/blob/9f9b437b716e6b9bb0a564563c7400b2c040234d/adapters/gossamer/scale_codec.go#L25 -
lib/common'sHashis used by https://github.com/w3f/polkadot-tests/blob/9f9b437b716e6b9bb0a564563c7400b2c040234d/adapters/gossamer/state_trie.go#L90 -
lib/runtimeis used by https://github.com/w3f/polkadot-tests/tree/main/adapters/gossamer/host_api:-
Instanceby https://github.com/w3f/polkadot-tests/blob/9f9b437b716e6b9bb0a564563c7400b2c040234d/adapters/gossamer/host_api/allocator.go#L29 - (TODO check other files)
-
Also see https://github.com/ChainSafe/gossamer/network/dependents?package_id=UGFja2FnZS0yMjY0OTQyMjIx