Import rules

PHOTO EMBED

Fri Jun 14 2024 17:08:46 GMT+0000 (Coordinated Universal Time)

Saved by @pag0dy

package main
// Every go file belongs to only one package
// One package can comprise many Go files
// The package to which the code file belongs must be indicated on the first line
// The package name is always written in lowercase letters
// Each Go app contains one "main" package

import (
	"fmt"
  	"os"
  	we "whatever"
)
// Here we factor the keyword, meaning we call it once on multiple instances.
// This factoring is also applicable to keywords like "const", "var" and "type".
// In the last import we're using an alias, so later we can use it as "we".

object, err := we.Object
if err != nil {
		panic(err)
	}

/* Here we import an visible object (must begin with capital letter) from the package "whatever", using its alias "we"

content_copyCOPY