mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 22:28:26 +03:00
go: update to ubuntu:24.04 and convert to go.mod style
This commit is contained in:
parent
e4a92b1c1c
commit
61323306c2
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:20.04
|
||||
FROM ubuntu:24.04
|
||||
MAINTAINER Joel Martin <github@martintribe.org>
|
||||
|
||||
##########################################################
|
||||
@ -19,4 +19,6 @@ WORKDIR /mal
|
||||
# Specific implementation requirements
|
||||
##########################################################
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install g++ golang libedit-dev pkg-config
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install g++ golang libreadline-dev libedit-dev pkg-config
|
||||
|
||||
ENV HOME /mal
|
||||
|
@ -1,5 +1,3 @@
|
||||
export GOPATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
#####################
|
||||
|
||||
SOURCES_BASE = src/types/types.go src/readline/readline.go \
|
||||
@ -24,7 +22,7 @@ mal: $(word $(words $(BINS)),$(BINS))
|
||||
|
||||
define dep_template
|
||||
$(1): $(SOURCES_BASE) src/$(1)/$(1).go
|
||||
go build $$@
|
||||
go build -o $$@ ./src/$(1)
|
||||
endef
|
||||
|
||||
$(foreach b,$(BINS),$(eval $(call dep_template,$(b))))
|
||||
|
3
impls/go/go.mod
Normal file
3
impls/go/go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module mal
|
||||
|
||||
go 1.22.2
|
@ -9,10 +9,10 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// Errors/Exceptions
|
||||
|
2
impls/go/src/env/env.go
vendored
2
impls/go/src/env/env.go
vendored
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
. "types"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
type Env struct {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"types"
|
||||
"mal/src/types"
|
||||
)
|
||||
|
||||
func Pr_list(lst []types.MalType, pr bool,
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
. "types"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
type Reader interface {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"readline"
|
||||
"mal/src/readline"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -6,10 +6,10 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -7,10 +7,10 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -7,11 +7,11 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -7,12 +7,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -7,12 +7,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
"core"
|
||||
. "env"
|
||||
"printer"
|
||||
"reader"
|
||||
"readline"
|
||||
. "types"
|
||||
"mal/src/core"
|
||||
. "mal/src/env"
|
||||
"mal/src/printer"
|
||||
"mal/src/reader"
|
||||
"mal/src/readline"
|
||||
. "mal/src/types"
|
||||
)
|
||||
|
||||
// read
|
||||
|
Loading…
Reference in New Issue
Block a user