INNER CODE UNIT · Go

addExisting

abahmed/kwatch · cmd/configcatalog/main.go:160

func addExisting(path string, old map[string]string, seen map[string]bool) map[string]bool {
	if _, ok := old[path]; ok {
		seen[path] = true
	}
	return seen
}

func catalogLine(path string, t reflect.Type, value reflect.Value, meta metadata) string {
	if t.Kind() == reflect.Pointer {
		t = t.Elem()
	}
	typeName := "string"
	switch t.Kind() {
	case reflect.Bool:
		typeName = "boolean"
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
		reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
		typeName = "integer"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…