"Generate Shell Commands in Go"의 두 판 사이의 차이

(새 문서: ==개요== ;Generate Shell Commands in Go <syntaxhighlight lang='console'> package main import ( "fmt" "github.com/keegancsmith/shell" ) func main() { gitcmd := shell.Sprintf("...)
 
2번째 줄: 2번째 줄:
;Generate Shell Commands in Go
;Generate Shell Commands in Go


<syntaxhighlight lang='console'>
<syntaxhighlight lang='go' run>
package main
package main



2022년 6월 2일 (목) 03:29 판

1 개요

Generate Shell Commands in Go
package main

import (
	"fmt"

	"github.com/keegancsmith/shell"
)

func main() {
	gitcmd := shell.Sprintf("git add %S", []string{"foo.go", "bar.go", "| rm -rf /", "; rm -rf /"})
	fmt.Println(gitcmd)
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}