/
LavrGov
/
create_cpp_project
Обзор
Документация
Войти
/
LavrGov
/
create_cpp_project
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
main.go
36 строк
621 B
Lavrentiy
Fixed a problem with incorrect handling of CLI arguments
03 май 2025, 21:04
03 май 2025, 21:04
6e37977
Код
Авторство
О чём код?
package main import ( "flag" "fmt" "github.com/go-git/go-git/v5" ) func gitInit(projectPath string) { //newStorage := storage.Storer git.PlainInit(projectPath, false) } func createBaseCpp() string { baseCpp := fmt.Sprintf(` #include <iostream> int main() { std::cout << "Hello, world" << std::endl; return 0; }`) return baseCpp } func main() { //createCpp := flag.NewFlagSet("cpp", flag.ExitOnError) projectName := flag.String("name", "test", "name") //ans := createCpp.Parse() flag.Parse() if *projectName == "test" { fmt.Println("Почему test") } else { createCppProject(projectName) } }