Add go.mod file

pull/1/head
Leonid Maslakov 5 months ago
parent 8bc8d9fc70
commit b2fb4eabe1
  1. 11
      .github/workflows/bin_release.yml
  2. 7
      Dockerfile
  3. 2
      Makefile
  4. 4
      cmd/wallblog_run.go
  5. 5
      go.mod
  6. 5
      go.sum
  7. 2
      internal/handler/handler.go
  8. 2
      internal/handler/handler_md.go
  9. 2
      internal/handler/page_part.go

@ -21,11 +21,12 @@ jobs:
with:
go-version: '1.15.15'
- name: Install Go dependencies
run: go get github.com/lcomrade/md2html
- name: Make
run: make release
- name: Build
run: |-
export GOPATH="$HOME/go"
mkdir -p $GOPATH/github.com/lcomrade/
ln -s . $GOPATH/github.com/lcomrade/wallblog
make release
- name: Upload release binaries
uses: alexellis/upload-assets@0.2.2

@ -4,9 +4,14 @@ FROM golang:1.15.15-alpine as build
WORKDIR /build
RUN apk update && apk upgrade && apk add --no-cache make git
RUN go get github.com/lcomrade/md2html
COPY . ./
ENV GOPATH="/root/go"
RUN \
mkdir -p $GOPATH/github.com/lcomrade/ && \
ln -s . $GOPATH/github.com/lcomrade/wallblog
RUN make

@ -1,5 +1,5 @@
NAME = wallblog
MAIN_GO = ./cmd/$(NAME)*
MAIN_GO = ./cmd/*.go
LDFLAGS = -w -s
all:

@ -19,8 +19,8 @@
package main
import (
"../internal/cfg"
"../internal/handler"
"github.com/lcomrade/wallblog/internal/cfg"
"github.com/lcomrade/wallblog/internal/handler"
"net/http"
)

@ -0,0 +1,5 @@
module github.com/lcomrade/wallblog
go 1.11
require github.com/lcomrade/md2html/v2 v2.1.2

@ -0,0 +1,5 @@
github.com/lcomrade/highlight v1.0.0 h1:4AedfhU/sRF6kooDkrsAeNVVUTbASkeHQylnj+1UZo0=
github.com/lcomrade/highlight v1.0.0/go.mod h1:J6QdV+WeR7DF5i2AVx03BsQziTLz7lSjbxlm5TAOuzQ=
github.com/lcomrade/md2html v2.1.1+incompatible/go.mod h1:ayRlo/72segWSazvawKpHg2dkX8U4ZROFG6Cf5sCSzo=
github.com/lcomrade/md2html/v2 v2.1.1 h1:8Jrn0KTcYCg3jGpS6NkitzpS9vkLmDeMJJxWEEfvKgI=
github.com/lcomrade/md2html/v2 v2.1.1/go.mod h1:EfiaIYKeqqQ+CR7O+CdxS6F212rstu/zxpmNS7NQNec=

@ -19,7 +19,7 @@
package handler
import (
"../cfg"
"github.com/lcomrade/wallblog/internal/cfg"
"net/http"
"os"
"path/filepath"

@ -19,7 +19,7 @@
package handler
import (
"github.com/lcomrade/md2html"
"github.com/lcomrade/md2html/v2"
"net/http"
)

@ -19,7 +19,7 @@
package handler
import (
"github.com/lcomrade/md2html"
"github.com/lcomrade/md2html/v2"
"path/filepath"
)

Loading…
Cancel
Save