Commit 07c2e411 authored by owlo's avatar owlo

proper json consumption

parent 9f365630
No preview for this file type
......@@ -14,6 +14,7 @@ import (
func validate(signature string, file []byte) {
bufferedReader, err := os.Create("tests/outfile")
defer os.Remove("tests/outfile")
if err != nil {
fmt.Println("Error creating outfile")
}
......@@ -22,6 +23,7 @@ func validate(signature string, file []byte) {
decrypter := exec.Command("/bin/sh", "-c", "echo crashandburn | gpg --passphrase-fd 0 -o out.json outfile")
decrypter.Dir = "tests/"
decrypter.Run()
//if err != nil {
// fmt.Println("Error running command")
// fmt.Println(err)
......@@ -30,6 +32,7 @@ func validate(signature string, file []byte) {
func UnmActors(currentActors string) libs.ActorS {
actorFile, err := os.Open(currentActors)
defer actorFile.Close()
defer os.Remove("tests/out.json")
if err != nil {
fmt.Println("Error, cannot find current actor file.")
}
......
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "en"}],
"type": "Note",
"id": "https://ScN.example/p/2415",
"summary": "bork!",
"source": {
"content": "Programming is fun!",
"mediaType": "text"}
}
\ No newline at end of file
-----BEGIN PGP SIGNATURE-----
wcFMA8KFgKEx+X8OARAAQAfuae2EB+YhBTuWRV0dg7+hDy2eMBx7BmTYgpxhHH0k
M0qU2Uun4kqXWYF66YEMPthfmf/iOCqRruCDhzdljcqvJt0+c0j1PUHxUBtiQYx7
SWTV6HKJtS0ZrnsbpRYyZSPLgurmshad6hxX2XMxehy77g07cBwo8sbwRxrvqLuB
yuElFTiCf3Nz3UO+2z7uTPY8kN3tslL0FYCxx8NIht4cqP7yhKQIZabNmYc0d1cP
E/KgADy0uo9vKunoI47cshhLWqh7xXnR8GwXj1MFRjDwk+kJ7XLV+SEU4pl7sD7v
TNNSPGUuKFPZEJxoHndErUq8GkIGCh3MXA+0agWK5RL7oUgbaACdpZLcNy3JVmQn
OTmusb8yLSMk55cvf/h33QvzvD+FQhQiChvGQNu+FIX6LA67ddAtyK9BwOG2XChR
gO6kKWN1Ov7se+AR4s4rFrZBVMSP3v+1yAvvxkDgo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KfdqGGQkrD81yx9Jy0/GxMSDltxz+haKUaNswtJFQEiyRSVqY0H
0Ao+K62hx2w/rIUD/W+kha/BM1zGs+aZbt9EJCbAurMsPNm0NrNoIBe+j1V9RAYF
JS7cHxlf05kiZbHtDD0HXlkMK0qR0wAHYQygwiZLvGDjOkkwyEkl/pc6MY9ORvea
MWjqRC8rkWS0Ve/vfcbunrr3RX+Bo9dYH1/YkdDv9veG4a9chvpqXKDXWyHp7AeV
szKym8IGxP5vtHMJvkOwjGg5rYyXmqPYHbvqKsgprtFdAHDgiPpudTbTZ56yIcAW
zhuJfUD07cG+6ZY9gKSZxRcVEErtZAFrUD8yqPZNnw3vXZY6G6+6kR/7j2A5ZP8F
08E9YvUnq0CwvRjxQ+ZWXVQ7w54rfv1sWDaTg9mn/Fj2h+q1vRadWJDrYQzyd+DL
NwfPyhjxmM6B23fOHsoWCVxFXFala2DvskAfJqCuvZEePGEhjsZPy8XDF5k2apKo
Y2U9uO45n1gETDtSjoY0GA+GqR6bj9Fed+J4AAsEMNtKDM1Rot3QDJFyV8LaAolt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment