Skip to content

Conversation

mcarifio
Copy link

@mcarifio mcarifio commented May 17, 2022

go.mod appears to be needed to compile the chapter2 sample, at least without downloading matchers and search independently in ways I don't yet understand. So figured out how to replace the imports in main.go with local directories mostly through examples and cut and paste. I don't exactly know what I'm doing, but I'll let you cherrypick what changes you want, if any.

@tldzyx
Copy link

tldzyx commented Nov 3, 2023

like this:

exec cd chapter2/sample && go mod init main

/chapter2/sample/go.mod

module main

go 1.21

modify import

/chapter2/sample/main.go

import (
	"log"
	"os"

	_ "main/matchers"
	"main/search"
)

modify import

/chapter2/sample/matchers/rss.go

import (
	"encoding/xml"
	"errors"
	"fmt"
	"log"
	"main/search"
	"net/http"
	"regexp"
)

finally, run go run main.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants