Skip to content

Commit

Permalink
feat: support go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoukk committed Feb 26, 2021
1 parent 3ef422d commit 2674fb1
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import "log"

Expand Down
2 changes: 1 addition & 1 deletion cache_memcache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"github.com/bradfitz/gomemcache/memcache"
Expand Down
2 changes: 1 addition & 1 deletion cache_memory.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"container/list"
Expand Down
2 changes: 1 addition & 1 deletion cache_redis.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion context.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"crypto/md5"
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module kimg

go 1.14

require (
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/gomodule/redigo v1.8.4
gopkg.in/gographics/imagick.v3 v3.3.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)
15 changes: 15 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0=
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gomodule/redigo v1.8.4 h1:Z5JUg94HMTR1XpwBaSH4vq3+PNSIykBLxMdglbw10gg=
github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/gomodule/redigo/redis v0.0.0-do-not-use h1:J7XIp6Kau0WoyT4JtXHT3Ei0gA1KkSc6bc87j9v9WIo=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/gographics/imagick.v3 v3.3.0 h1:MI9qkquiNDmrSGnTG2241GZqOUgEfR7KQpVsVLxiylk=
gopkg.in/gographics/imagick.v3 v3.3.0/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion httpd.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion image.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion logger_console.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"log"
Expand Down
2 changes: 1 addition & 1 deletion logger_file.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"log"
Expand Down
4 changes: 3 additions & 1 deletion kimg.go → main/kimg.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"log"
"net/http"
"runtime"

"github.com/zhoukk/kimg"
)

var (
Expand All @@ -22,7 +24,7 @@ func init() {
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())

ctx, err := NewKimgContext(configFile)
ctx, err := kimg.NewKimgContext(configFile)
if err != nil {
log.Println(err)
flag.Usage()
Expand Down
2 changes: 1 addition & 1 deletion storage.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion storage_file.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package kimg

import (
"io/ioutil"
Expand Down

0 comments on commit 2674fb1

Please sign in to comment.