Skip to content

Commit

Permalink
project refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
araujo88 committed Oct 19, 2024
1 parent 6da284a commit 4f5ebd1
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/main.go → cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ package main
import (
"log"
"time"

nostrbot "github.com/araujo88/bitcoin-price-bot-nostr/pkg"

Check failure on line 7 in cmd/main.go

View workflow job for this annotation

GitHub Actions / build

import "github.com/araujo88/bitcoin-price-bot-nostr/pkg" is a program, not an importable package

Check failure on line 7 in cmd/main.go

View workflow job for this annotation

GitHub Actions / build

found packages main (config.go) and nostrbot (post.go) in /home/runner/work/bitcoin-price-bot-nostr/bitcoin-price-bot-nostr/pkg
)

func main() {

for {
err := doPost()
err := nostrbot.DoPost()

if err != nil {
log.Fatal(err)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/post.go → pkg/post.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package nostrbot

import (
"context"
Expand All @@ -12,7 +12,7 @@ import (
"github.com/nbd-wtf/go-nostr/nip19"
)

func doPost() error {
func DoPost() error {
profile := ""
cfg, err := loadConfig(profile)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/relay.go → pkg/relay.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package nostrbot

type Relay struct {
Read bool `json:"read"`
Expand Down

0 comments on commit 4f5ebd1

Please sign in to comment.