浏览代码

Remove accidentally committed files

Thomas Frössman 9 年前
父节点
当前提交
42c704179e
共有 2 个文件被更改,包括 0 次插入97 次删除
  1. 0
    50
      cmd/blka.go
  2. 0
    47
      cmd/internet/internet.go

+ 0
- 50
cmd/blka.go 查看文件

@@ -1,50 +0,0 @@
1
-package main
2
-
3
-import (
4
-	"log"
5
-	"net"
6
-)
7
-
8
-func main() {
9
-	log.Println(net.IPv4Mask(255, 240, 0, 0))
10
-	for i := 0; i < 8*net.IPv4len; i++ {
11
-		log.Println(net.CIDRMask(8*net.IPv4len-i, 8*net.IPv4len))
12
-	}
13
-
14
-	for _, value := range []net.IPMask{
15
-		net.IPv4Mask(255, 255, 255, 255),
16
-		net.IPv4Mask(255, 255, 255, 252),
17
-		net.IPv4Mask(255, 255, 255, 248),
18
-		net.IPv4Mask(255, 255, 255, 240),
19
-		net.IPv4Mask(255, 255, 255, 224),
20
-		net.IPv4Mask(255, 255, 255, 192),
21
-		net.IPv4Mask(255, 255, 255, 128),
22
-		net.IPv4Mask(255, 255, 255, 0),
23
-		net.IPv4Mask(255, 255, 254, 0),
24
-		net.IPv4Mask(255, 255, 252, 0),
25
-		net.IPv4Mask(255, 255, 248, 0),
26
-		net.IPv4Mask(255, 255, 240, 0),
27
-		net.IPv4Mask(255, 255, 224, 0),
28
-		net.IPv4Mask(255, 255, 192, 0),
29
-		net.IPv4Mask(255, 255, 128, 0),
30
-		net.IPv4Mask(255, 255, 0, 0),
31
-		net.IPv4Mask(255, 254, 0, 0),
32
-		net.IPv4Mask(255, 252, 0, 0),
33
-		net.IPv4Mask(255, 248, 0, 0),
34
-		net.IPv4Mask(255, 240, 0, 0),
35
-		net.IPv4Mask(255, 224, 0, 0),
36
-		net.IPv4Mask(255, 192, 0, 0),
37
-		net.IPv4Mask(255, 128, 0, 0),
38
-		net.IPv4Mask(255, 0, 0, 0),
39
-		net.IPv4Mask(254, 0, 0, 0),
40
-		net.IPv4Mask(252, 0, 0, 0),
41
-		net.IPv4Mask(248, 0, 0, 0),
42
-		net.IPv4Mask(240, 0, 0, 0),
43
-		net.IPv4Mask(224, 0, 0, 0),
44
-		net.IPv4Mask(192, 0, 0, 0),
45
-		net.IPv4Mask(128, 0, 0, 0),
46
-	} {
47
-		log.Println(value)
48
-	}
49
-
50
-}

+ 0
- 47
cmd/internet/internet.go 查看文件

@@ -1,47 +0,0 @@
1
-package main
2
-
3
-import (
4
-	"flag"
5
-	"time"
6
-
7
-	"github.com/garyburd/redigo/redis"
8
-)
9
-
10
-func main() {
11
-	flag.Parse()
12
-
13
-	pool := newPool(*redisServer, *redisPassword)
14
-
15
-}
16
-
17
-func newPool(server, password string) *redis.Pool {
18
-	return &redis.Pool{
19
-		MaxIdle:     10,
20
-		IdleTimeout: 240 * time.Second,
21
-		Dial: func() (redis.Conn, error) {
22
-			c, err := redis.Dial("tcp", server)
23
-			if err != nil {
24
-				return nil, err
25
-			}
26
-			if password != "" {
27
-				if _, err := c.Do("AUTH", password); err != nil {
28
-					c.Close()
29
-					return nil, err
30
-				}
31
-			}
32
-			return c, err
33
-		},
34
-		TestOnBorrow: func(c redis.Conn, t time.Time) error {
35
-			_, err := c.Do("PING")
36
-			return err
37
-		},
38
-	}
39
-
40
-}
41
-
42
-var (
43
-	pool          *redis.Pool
44
-	redisServer   = flag.String("redisServer", ":28743", "")
45
-	redisPassword = flag.String("redisPassword", "", "")
46
-	ip2asn        = flag.String("ip2asn", "", "IP address to resolve to AS number")
47
-)