1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package repository import ( "time" "lindenii.org/go/furgit/config" ) func detectPackedRefsTimeout(cfg *config.Config) time.Duration { timeoutValue, err := cfg.Lookup("core", "", "packedrefstimeout").Int() if err != nil { return time.Second } return time.Duration(timeoutValue) * time.Millisecond }