for i := 0; i < 4000000000; i++ {
sum += i
}
var u []*user
users = u
if *LOCAL_PERCENT < *GLOBAL_PERCENT
type myString string
type MyStruct struct {
SimpleString string
NotSoSimpleString myString
}
Error Strings
Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context. That is, use fmt.Errorf("something bad") not fmt.Errorf("Something bad"), so that log.Printf("Reading %s: %v", filename, err) formats without a spurious capital letter mid-message. This does not apply to logging, which is implicitly line-oriented and not combined inside other messages.
package main
import "fmt"
type struct1 struct {
NameList []struct2
}
type struct2 struct {
ID int
FuncList []struct3
}
type struct3 struct {
Date []string
Power int
Intelect int
}
func main(){
Struct3 := struct3{}
Struct3.Date = append(Struct3.Date, "date1", "date2")
Struct3.Date = append(Struct3.Date, "date3")
Struct2 := struct2{}
Struct2.FuncList = append(Struct2.FuncList, Struct3)
Struct1 := struct1{}
Struct1.NameList = append(Struct1.NameList, Struct2)
fmt.Printf("%+v", Struct1)
}
docker exec -it <containername> sh
./app
COPY . .
RUN go get && go install
Так вы сократит число слоев в вашем имейдже