Use go modules
This commit is contained in:
parent
99862b6daa
commit
9dc1f401b7
11 changed files with 82 additions and 70 deletions
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"srs.epita.fr/fic-server/libfic"
|
||||
|
||||
"github.com/russross/blackfriday/v2"
|
||||
"golang.org/x/crypto/blake2b"
|
||||
"gopkg.in/russross/blackfriday.v2"
|
||||
)
|
||||
|
||||
func ProcessMarkdown(i Importer, input string, rootDir string) (output string, err error) {
|
||||
|
@ -25,7 +25,7 @@ func ProcessMarkdown(i Importer, input string, rootDir string) (output string, e
|
|||
blackfriday.WithRenderer(blackfriday.NewHTMLRenderer(
|
||||
blackfriday.HTMLRendererParameters{
|
||||
AbsolutePrefix: absPath,
|
||||
Flags: blackfriday.CommonHTMLFlags,
|
||||
Flags: blackfriday.CommonHTMLFlags,
|
||||
},
|
||||
)),
|
||||
))
|
||||
|
@ -52,7 +52,7 @@ func ProcessMarkdown(i Importer, input string, rootDir string) (output string, e
|
|||
} else {
|
||||
defer fdto.Close()
|
||||
writer := bufio.NewWriter(fdto)
|
||||
if err = getFile(i, rootDir + iPath, writer); err != nil {
|
||||
if err = getFile(i, rootDir+iPath, writer); err != nil {
|
||||
os.Remove(dPath)
|
||||
return
|
||||
}
|
||||
|
|
Reference in a new issue