小编Ale*_*lek的帖子

是否可以接受goroutines中的goroutines?

我正在学习Go现在正在使用,我的第一个项目之一就是一个简单的ping脚本.基本上我想ping一堆网址,并在每个网站的响应中等待XXX秒,然后再次ping.这是删节代码:

func main() {
    //  read our text file of urls
    f, err := ioutil.ReadFile(urlFile)
    if err != nil {
        log.Print(err)
    }

    urlStrings := []string{}
    urlStrings = strings.Split(string(f), "\n")

    for _, v := range urlStrings {
        go ping(v)
    }

    //  output logs to the terminal
    //  channel is global
    for i := range c {
        fmt.Println(i)
    }
}

func ping(url string) {
    //  for our lag timer
    start := time.Now()

    //  make our request
    _, err := http.Get(url)

    if err …
Run Code Online (Sandbox Code Playgroud)

go goroutine

11
推荐指数
2
解决办法
4626
查看次数

sed:-e expression#1,char 23:`s'的未知选项

我正在尝试使用sed来使用bash脚本更新配置文件.我在脚本运行正常的上面有一个类似的sed命令.我似乎无法弄清楚为什么这会破坏:

sed -i.bak \
    -e s/"socketPath:'https://localhost:9091'"/"socketPath:'/socket'"/g \
    $WEB_CONF
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

sed

6
推荐指数
2
解决办法
2万
查看次数

如何通过命令行将Illustrator文件转换为EPS(*nix)

我正在尝试通过Linux上的命令行将AI文件批量转换为EPS文件.我熟悉使用Ghostscript进行各种EPS和Postscript相关任务.我使用Ghostscript epswrite设备已经半成功,但我的理解是这个设备已被弃用.

在*nix环境中通过命令行将Adobe Illustrator文件转换为EPS文件的最佳方法是什么?

postscript adobe-illustrator ghostscript

3
推荐指数
1
解决办法
6073
查看次数

标签 统计

adobe-illustrator ×1

ghostscript ×1

go ×1

goroutine ×1

postscript ×1

sed ×1