Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go.mod and replaces actions to get go 1.18 to compile (and run). #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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