-- Yesterday afternoon the local creek near us had already gone several inches over the footbridge too! 😱😱
# I am the Watcher. I am your guide through this vast new twtiverse. # # Usage: # https://watcher.sour.is/api/plain/users View list of users and latest twt date. # https://watcher.sour.is/api/plain/twt View all twts. # https://watcher.sour.is/api/plain/mentions?uri=:uri View all mentions for uri. # https://watcher.sour.is/api/plain/conv/:hash View all twts for a conversation subject. # # Options: # uri Filter to show a specific users twts. # offset Start index for quey. # limit Count of items to return (going back in time). # # twt range = 1 196262 # self = https://watcher.sour.is?offset=184094 # next = https://watcher.sour.is?offset=184194 # prev = https://watcher.sour.is?offset=183994
-- Yesterday afternoon the local creek near us had already gone several inches over the footbridge too! 😱😱
NewRAMStorage(…) is just something that setups your storage and initial data.. that can probably live with storage/sqlite. The point is the storage package does not import the implementations of storage.Storage It just defines the contract for things that use that interface. Now storage/sqlite CAN import storage and not have a circle dep.
- app < storage
< storage/sqlite
< controller < storage
< storage/sqlite
- sqlite < storage
- storage X storage/sqlite
NewRAMStorage(…) is just something that setups your storage and initial data.. that can probably live with storage/sqlite. The point is the storage package does not import the implementations of storage.Storage It just defines the contract for things that use that interface. Now storage/sqlite CAN import storage and not have a circle dep.
- app < storage
< storage/sqlite
< controller < storage
< storage/sqlite
- sqlite < storage
- storage X storage/sqlite
storage.Storage Storage interface (no tests!) storage.Storage Storage interface (no tests!)
Stephen Chance's "Septimus and the Minster Ghost" in a Faber Finds edition: White cover, grey text surrounded by a red frame.
Stephen Chance's "Septimus and the Minster Ghost" in a Faber Finds edition: White cover, grey text surrounded by a red frame.
Storage interfaceStorage interfacenewRAMStorage(testing.T, $initialData) *StorageStoragenewRAMStorage(…) functionnewRAMStorage(…) into aNewRAMStorage(…)testutils.NewRAMStorage(…)testutils.NewRamStorage(…)teststorage package imports storage for storage.Storage and the storage package imports testutils for testutils.NewRAMStorage(…) in its test. I'm just screwed. For now, I duplicated it as newRAMStorage(…) in controller/feeds_test.go.NewRAMStorage(…) in storage/testutils.go, which could be guarded with //go:build testutils. With go test -tags testutils …, in storage/sqlite_test.go could just use NewRAMStorage(…) directly and similarly in controller/feeds_test.go I could call storage.NewRamStorage(…). But I don't know if I would consider this really elegant.!prod instead of testing. Only when building the final binary, I would have to specify the tag to exclude all the non-prod stuff. Hmmm.*
Storage interfaceStorage interfacenewRAMStorage(testing.T, $initialData) *StorageStoragenewRAMStorage(…) functionnewRAMStorage(…) into aNewRAMStorage(…)testutils.NewRAMStorage(…)testutils.NewRamStorage(…)teststorage package imports storage for storage.Storage and the storage package imports testutils for testutils.NewRAMStorage(…) in its test. I'm just screwed. For now, I duplicated it as newRAMStorage(…) in controller/feeds_test.go.NewRAMStorage(…) in storage/testutils.go, which could be guarded with //go:build testutils. With go test -tags testutils …, in storage/sqlite_test.go could just use NewRAMStorage(…) directly and similarly in controller/feeds_test.go I could call storage.NewRamStorage(…). But I don't know if I would consider this really elegant.!prod*
Storage interfaceStorage interfacenewRAMStorage(testing.T, $initialData) *StorageStoragenewRAMStorage(…) functionnewRAMStorage(…) into aNewRAMStorage(…)testutils.NewRAMStorage(…)testutils.NewRamStorage(…)teststorage package imports storage for storage.Storage and the storage package imports testutils for testutils.NewRAMStorage(…) in its test. I'm just screwed. For now, I duplicated it as newRAMStorage(…) in controller/feeds_test.go.NewRAMStorage(…) in storage/testutils.go, which could be guarded with //go:build testutils. With go test -tags testutils …, in storage/sqlite_test.go could just use NewRAMStorage(…) directly and similarly in controller/feeds_test.go I could call storage.NewRamStorage(…). But I don't know if I would consider this really elegant.!prod instead of testing. Only when building the final binary, I would have to specify the tag to exclude all the non-prod stuff. Hmmm.*
Foto do disco a ser tocado
Foto do disco a ser tocado
twt.Attrs().Get("lang")twt.Attrs().Get("lang")