Skip to content

Commit 5893a36

Browse files
author
blackmarllbor0
committed
changed the language to transfer the project to an opensourse afterwards
1 parent d079ae7 commit 5893a36

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

internal/app/dir/dir.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/blackmarllboro/create-project-struct/internal/pkg/args"
1111
)
1212

13-
const perm = 0755 // Право доступа для создания папок
13+
const perm = 0755 // Access rights to create folders
1414

15-
// Константы с именем подкаталогов проекта
15+
// Constants with the name of the project subdirectories
1616
const (
1717
cmdDir = "cmd"
1818
pkgDir = "pkg"

internal/app/file/file.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package file
22

33
import (
44
"fmt"
5-
"github.com/blackmarllboro/create-project-struct/pkg/version"
65
"os"
76
"path"
7+
8+
"github.com/blackmarllboro/create-project-struct/pkg/version"
89
)
910

1011
type File struct {

internal/pkg/args/args.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import (
55
"os"
66
)
77

8-
// GetProjectName функция для получения имени проекта.
9-
// Имя задается через аргумент командной строки.
10-
// Задайте аргумент ".", чтобы создать проект в текущей директории.
11-
// Булево значение возвращает true в том случае, если приложение
12-
// создается в текущем каталоге.
8+
// GetProjectName function for getting the project name. The name is specified
9+
// via a command line argument. Set the argument "." to create a project in the
10+
// current directory. Boolean value returns true if the application is created in
11+
// the current directory.
1312
func GetProjectName() (string, bool, error) {
1413
if len(os.Args) < 2 {
1514
return "", false, errors.New("the project name has not been transferred")

pkg/version/version.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ import (
66
"strings"
77
)
88

9-
// GoVersion получает текущую версию go и возвращает ее в формате go X.Y.
9+
// GoVersion receives the current version of go and returns it in go X.Y format.
1010
func GoVersion() (string, error) {
1111
cmd := exec.Command("go", "version")
1212
output, err := cmd.Output()
1313
if err != nil {
1414
return "", err
1515
}
1616

17-
// для поиска нужной части в строке.
17+
// to search for the desired part in the string.
1818
re := regexp.MustCompile(`go\d+\.\d+(\.\d+)?`)
1919
version := re.FindString(string(output))
2020

21-
// преобразуем к нужному виду.
21+
// convert to the desired form.
2222
version = strings.Replace(version, "go", "", 1)
2323
versionParts := strings.Split(version, ".")
2424
version = "go " + versionParts[1] + "." + versionParts[2]

0 commit comments

Comments
 (0)