You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: init.go
    path of file: ./repos/under-the-hood/gosrc/cmd/go/internal/modcmd
    
    the code of the file until where you have to start completion: // Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// go mod init

package modcmd

import (
	"cmd/go/internal/base"
	"cmd/go/internal/modload"
	"cmd/go/internal/work"
	"os"
	"strings"
)

var cmdInit = &base.Command{
	UsageLine: "go mod init [module]",
	Short:     "initialize new module in current directory",
	Long: `
Init initializes and writes a new go.mod to the cur
    
func runInit(cmd *base.Command, args []string) {
	modload.CmdModInit = true
	if len(args) > 1 {
		base.Fatalf("go mod init: too many arguments")
	}
	if len(args) == 1 {
		modload.CmdModModule = args[0]
	}
	if os.Getenv("GO111MODULE") == "off" {
		base.Fatalf("go mod init: modules disabled by GO111MODULE=off; see 'go help modules'")
	}
	modFilePath := modload.ModFilePath()
	if _, err := os.Stat(modFilePath); err == nil {
		base.Fatalf("go mod init: go.mod already exists")
	}
	if strings.Contains(modload.CmdModModule, "@") {
		base.Fatalf("go mod init: module path must not contain '@'")
	}
	modload.InitMod() // does all the hard work
}