Jelajahi Sumber

x/model: update package level docs

Blake Mizerany 1 tahun lalu
induk
melakukan
7f1faf6c12
1 mengubah file dengan 11 tambahan dan 1 penghapusan
  1. 11 1
      x/model/file.go

+ 11 - 1
x/model/file.go

@@ -1,4 +1,14 @@
-// Package model implements the Modelfile and Path formats.
+// Package model implements the File and Name types for working with and
+// representing Modelfiles and model Names.
+//
+// The Name type is designed for safety and correctness. It is an opaque
+// reference to a model, and holds the parts of a model, casing preserved,
+// but is not directly comparable with other Names since model names can be
+// represented with different caseing depending on the use case.
+//
+// Names should never be compared manually parsed. Instead, use the
+// [Name.EqualFold] method to compare two names in a case-insensitive
+// manner, and [ParseName] to create a Name from a string, safely.
 package model
 
 import (