@@ -90,7 +90,7 @@ func getTemplateSet(templateName string) (*templateSet, error) {
9090}
9191
9292// Init initializes a new MCP server project in the specified directory
93- func Init (ctx context.Context , dir string , language string , templateName string ) error {
93+ func Init (_ context.Context , dir string , language string , templateName string ) error {
9494 if language != "go" {
9595 return fmt .Errorf ("unsupported language: %s (currently only 'go' is supported)" , language )
9696 }
@@ -102,7 +102,7 @@ func Init(ctx context.Context, dir string, language string, templateName string)
102102 }
103103
104104 // Create directory if it doesn't exist
105- if err := os .MkdirAll (dir , 0755 ); err != nil {
105+ if err := os .MkdirAll (dir , 0o755 ); err != nil {
106106 return fmt .Errorf ("creating directory: %w" , err )
107107 }
108108
@@ -121,12 +121,12 @@ func Init(ctx context.Context, dir string, language string, templateName string)
121121
122122 // Generate files from templates
123123 files := map [string ]string {
124- "main.go" : templates .mainGo ,
125- "Dockerfile" : templates .dockerfile ,
126- "compose.yaml" : templates .compose ,
127- "catalog.yaml" : templates .catalog ,
128- "go.mod" : templates .goMod ,
129- "README.md" : templates .readme ,
124+ "main.go" : templates .mainGo ,
125+ "Dockerfile" : templates .dockerfile ,
126+ "compose.yaml" : templates .compose ,
127+ "catalog.yaml" : templates .catalog ,
128+ "go.mod" : templates .goMod ,
129+ "README.md" : templates .readme ,
130130 }
131131
132132 // Add ui.html for chatgpt-app-basic template
@@ -148,7 +148,7 @@ func Init(ctx context.Context, dir string, language string, templateName string)
148148
149149 // Write file
150150 path := filepath .Join (dir , filename )
151- if err := os .WriteFile (path , buf .Bytes (), 0644 ); err != nil {
151+ if err := os .WriteFile (path , buf .Bytes (), 0o644 ); err != nil {
152152 return fmt .Errorf ("writing %s: %w" , filename , err )
153153 }
154154 }
0 commit comments