From e8548b900dc37fdcdbf21adcab191ba5765b563d Mon Sep 17 00:00:00 2001
From: vektra-bot <vektra-bot@vektra.github.io>
Date: Mon, 20 Jan 2025 21:37:10 +0000
Subject: [PATCH] Deployed b847fc8 to v3.0 with MkDocs 1.6.1 and mike
 2.2.0.dev0

---
 v3.0/404.html                                 |  55 +--
 .../{templates.png => template/index.png}     | Bin
 .../matryer.png}                              | Bin
 .../testify.png}                              | Bin
 v3.0/configuration/index.html                 | 118 +++---
 v3.0/faq/index.html                           |  55 +--
 v3.0/index.html                               |  55 +--
 v3.0/installation/index.html                  |  55 +--
 v3.0/replace-type/index.html                  |  57 +--
 v3.0/running/index.html                       |  59 +--
 v3.0/search/search_index.json                 |   2 +-
 v3.0/sitemap.xml                              |   8 +-
 v3.0/sitemap.xml.gz                           | Bin 273 -> 272 bytes
 v3.0/{templates => template}/index.html       | 390 ++----------------
 .../matryer}/index.html                       | 111 +++--
 .../testify}/index.html                       | 111 +++--
 v3.0/v3/index.html                            |  59 +--
 17 files changed, 356 insertions(+), 779 deletions(-)
 rename v3.0/assets/images/social/{templates.png => template/index.png} (100%)
 rename v3.0/assets/images/social/{template-matryer.png => template/matryer.png} (100%)
 rename v3.0/assets/images/social/{template-testify.png => template/testify.png} (100%)
 rename v3.0/{templates => template}/index.html (81%)
 rename v3.0/{template-matryer => template/matryer}/index.html (93%)
 rename v3.0/{template-testify => template/testify}/index.html (96%)

diff --git a/v3.0/404.html b/v3.0/404.html
index e4b957fa..c1a1a490 100644
--- a/v3.0/404.html
+++ b/v3.0/404.html
@@ -313,8 +313,6 @@
       
         
       
-        
-      
     
     
       
@@ -418,33 +416,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="/mockery/latest/templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="/mockery/latest/running/" class="md-nav__link">
         
@@ -483,6 +454,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -501,8 +476,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="/mockery/latest/template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -515,8 +492,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -530,13 +513,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="/mockery/latest/template-testify/" class="md-nav__link">
+      <a href="/mockery/latest/template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -563,7 +548,7 @@
   
   
     <li class="md-nav__item">
-      <a href="/mockery/latest/template-matryer/" class="md-nav__link">
+      <a href="/mockery/latest/template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/assets/images/social/templates.png b/v3.0/assets/images/social/template/index.png
similarity index 100%
rename from v3.0/assets/images/social/templates.png
rename to v3.0/assets/images/social/template/index.png
diff --git a/v3.0/assets/images/social/template-matryer.png b/v3.0/assets/images/social/template/matryer.png
similarity index 100%
rename from v3.0/assets/images/social/template-matryer.png
rename to v3.0/assets/images/social/template/matryer.png
diff --git a/v3.0/assets/images/social/template-testify.png b/v3.0/assets/images/social/template/testify.png
similarity index 100%
rename from v3.0/assets/images/social/template-testify.png
rename to v3.0/assets/images/social/template/testify.png
diff --git a/v3.0/configuration/index.html b/v3.0/configuration/index.html
index 595e7b9d..90cb832c 100644
--- a/v3.0/configuration/index.html
+++ b/v3.0/configuration/index.html
@@ -16,7 +16,7 @@
         <link rel="prev" href="../installation/">
       
       
-        <link rel="next" href="../templates/">
+        <link rel="next" href="../running/">
       
       
         
@@ -346,8 +346,6 @@
       
         
       
-        
-      
         
       
     
@@ -484,6 +482,19 @@
     </label>
     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
       
+        <li class="md-nav__item">
+  <a href="#example" class="md-nav__link">
+    <span class="md-ellipsis">
+      
+        <span class="md-typeset">
+          Example
+        </span>
+      
+    </span>
+  </a>
+  
+</li>
+      
         <li class="md-nav__item">
   <a href="#parameter-descriptions" class="md-nav__link">
     <span class="md-ellipsis">
@@ -498,17 +509,17 @@
 </li>
       
         <li class="md-nav__item">
-  <a href="#config-templates" class="md-nav__link">
+  <a href="#templates" class="md-nav__link">
     <span class="md-ellipsis">
       
         <span class="md-typeset">
-          Config Templates
+          Templates
         </span>
       
     </span>
   </a>
   
-    <nav class="md-nav" aria-label="Config Templates">
+    <nav class="md-nav" aria-label="Templates">
       <ul class="md-nav__list">
         
           <li class="md-nav__item">
@@ -583,33 +594,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="../running/" class="md-nav__link">
         
@@ -648,6 +632,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -666,8 +654,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -680,8 +670,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -695,13 +691,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -728,7 +726,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -986,6 +984,19 @@
     </label>
     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
       
+        <li class="md-nav__item">
+  <a href="#example" class="md-nav__link">
+    <span class="md-ellipsis">
+      
+        <span class="md-typeset">
+          Example
+        </span>
+      
+    </span>
+  </a>
+  
+</li>
+      
         <li class="md-nav__item">
   <a href="#parameter-descriptions" class="md-nav__link">
     <span class="md-ellipsis">
@@ -1000,17 +1011,17 @@
 </li>
       
         <li class="md-nav__item">
-  <a href="#config-templates" class="md-nav__link">
+  <a href="#templates" class="md-nav__link">
     <span class="md-ellipsis">
       
         <span class="md-typeset">
-          Config Templates
+          Templates
         </span>
       
     </span>
   </a>
   
-    <nav class="md-nav" aria-label="Config Templates">
+    <nav class="md-nav" aria-label="Templates">
       <ul class="md-nav__list">
         
           <li class="md-nav__item">
@@ -1104,6 +1115,7 @@
 
 
 <h1 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h1>
+<h2 id="example">Example<a class="headerlink" href="#example" title="Permanent link">&para;</a></h2>
 <p>All configuration is specified in a <code>.mockery.yml</code> file. An example config file may look like this:</p>
 <div class="highlight"><span class="filename">YAML</span><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">all</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">False</span>
 <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nt">template-data</span><span class="p">:</span>
@@ -1140,7 +1152,7 @@ <h1 id="configuration">Configuration<a class="headerlink" href="#configuration"
 <ol>
 <li>The parameters are merged hierarchically</li>
 <li>There are a number of template variables available to generalize config values.</li>
-<li>The style of mock to be generated is specified using the <a href="../templates/"><code>template</code></a> parameter.</li>
+<li>The style of mock to be generated is specified using the <a href="templates/index.md"><code>template</code></a> parameter.</li>
 </ol>
 <p>An output file may contain multiple mocks, but the only rule is that all the mocks in the file must come from the same package. Because of this, mocks for different packages must go in different files.</p>
 <h2 id="parameter-descriptions">Parameter Descriptions<a class="headerlink" href="#parameter-descriptions" title="Permanent link">&para;</a></h2>
@@ -1276,20 +1288,20 @@ <h2 id="parameter-descriptions">Parameter Descriptions<a class="headerlink" href
 </tr>
 </tbody>
 </table>
-<h2 id="config-templates">Config Templates<a class="headerlink" href="#config-templates" title="Permanent link">&para;</a></h2>
-<p>Parameters marked as being templated have access to a number of template variables and functions.</p>
+<h2 id="templates">Templates<a class="headerlink" href="#templates" title="Permanent link">&para;</a></h2>
+<p>Parameters marked as being templated have access to a number of template variables and functions through the Go <a href="https://pkg.go.dev/text/template#hdr-Examples"><code>text/template</code></a> system.</p>
 <h3 id="variables">Variables<a class="headerlink" href="#variables" title="Permanent link">&para;</a></h3>
-<p>The variables provided are specified in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#ConfigData"><code>ConfigData</code></a> struct.</p>
+<p>The variables provided are specified in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/config#Data"><code>config.Data</code></a> struct.</p>
 <h3 id="functions">Functions<a class="headerlink" href="#functions" title="Permanent link">&para;</a></h3>
-<p>All of the functions defined in <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#pkg-variables"><code>StringManipulationFuncs</code></a> are available to templated parameters.</p>
+<p>All of the functions defined in <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/shared#pkg-variables"><code>StringManipulationFuncs</code></a> are available to templated parameters.</p>
 <h2 id="merging-precedence">Merging Precedence<a class="headerlink" href="#merging-precedence" title="Permanent link">&para;</a></h2>
-<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in decreasing priority):</p>
+<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in increasing priority):</p>
 <ol>
-<li>Interface-specific config in <code>.mockery.yaml</code></li>
-<li>Package-specific config in <code>.mockery.yaml</code></li>
-<li>Command-line options</li>
-<li>Environment variables</li>
 <li>Top-level defaults in <code>.mockery.yaml</code></li>
+<li>Environment variables</li>
+<li>Command-line options</li>
+<li>Package-specific config in <code>.mockery.yaml</code></li>
+<li>Interface-specific config in <code>.mockery.yaml</code></li>
 </ol>
 <h2 id="formatting">Formatting<a class="headerlink" href="#formatting" title="Permanent link">&para;</a></h2>
 <p>If a parameter is named <code>enable-feature</code> and we want a value of <code>True</code>, then these are the formats for each source:</p>
@@ -1311,7 +1323,7 @@ <h2 id="formatting">Formatting<a class="headerlink" href="#formatting" title="Pe
 </tr>
 <tr>
 <td>yaml</td>
-<td><code>enable-feature: True</code></td>
+<td><code class="highlight"><span class="nt">enable-feature</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">True</span></code></td>
 </tr>
 </tbody>
 </table>
diff --git a/v3.0/faq/index.html b/v3.0/faq/index.html
index 0d3921a1..b13e844e 100644
--- a/v3.0/faq/index.html
+++ b/v3.0/faq/index.html
@@ -346,8 +346,6 @@
       
         
       
-        
-      
     
     
       
@@ -451,33 +449,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="../running/" class="md-nav__link">
         
@@ -516,6 +487,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -534,8 +509,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -548,8 +525,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -563,13 +546,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -596,7 +581,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/index.html b/v3.0/index.html
index 4812d8d9..7a9181a9 100644
--- a/v3.0/index.html
+++ b/v3.0/index.html
@@ -429,8 +429,6 @@
       
         
       
-        
-      
     
     
       
@@ -534,33 +532,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="running/" class="md-nav__link">
         
@@ -599,6 +570,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -617,8 +592,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -631,8 +608,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -646,13 +629,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="template-testify/" class="md-nav__link">
+      <a href="template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -679,7 +664,7 @@
   
   
     <li class="md-nav__item">
-      <a href="template-matryer/" class="md-nav__link">
+      <a href="template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/installation/index.html b/v3.0/installation/index.html
index 71b8e8d8..447e767a 100644
--- a/v3.0/installation/index.html
+++ b/v3.0/installation/index.html
@@ -346,8 +346,6 @@
       
         
       
-        
-      
         
       
     
@@ -570,33 +568,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="../running/" class="md-nav__link">
         
@@ -635,6 +606,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -653,8 +628,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -667,8 +644,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -682,13 +665,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -715,7 +700,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/replace-type/index.html b/v3.0/replace-type/index.html
index 57c0dc1d..f18a2059 100644
--- a/v3.0/replace-type/index.html
+++ b/v3.0/replace-type/index.html
@@ -13,7 +13,7 @@
         <link rel="canonical" href="https://vektra.github.io/mockery/latest/replace-type/">
       
       
-        <link rel="prev" href="../template-matryer/">
+        <link rel="prev" href="../template/matryer/">
       
       
         <link rel="next" href="../faq/">
@@ -346,8 +346,6 @@
       
         
       
-        
-      
     
     
       
@@ -451,33 +449,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="../running/" class="md-nav__link">
         
@@ -516,6 +487,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -534,8 +509,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -548,8 +525,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -563,13 +546,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -596,7 +581,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/running/index.html b/v3.0/running/index.html
index 63ea9595..e987834a 100644
--- a/v3.0/running/index.html
+++ b/v3.0/running/index.html
@@ -13,10 +13,10 @@
         <link rel="canonical" href="https://vektra.github.io/mockery/latest/running/">
       
       
-        <link rel="prev" href="../templates/">
+        <link rel="prev" href="../configuration/">
       
       
-        <link rel="next" href="../template-testify/">
+        <link rel="next" href="../template/">
       
       
         
@@ -346,8 +346,6 @@
       
         
       
-        
-      
         
       
     
@@ -451,33 +449,6 @@
                 
   
   
-  
-  
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
     
   
   
@@ -528,6 +499,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -546,8 +521,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -560,8 +537,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -575,13 +558,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -608,7 +593,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
diff --git a/v3.0/search/search_index.json b/v3.0/search/search_index.json
index 33951198..d5134918 100644
--- a/v3.0/search/search_index.json
+++ b/v3.0/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"mockery","text":"<p>Alpha Test</p> <p>Mockery <code>v3</code> is currently in alpha and should not be used for production.</p> <p>Mockery is a project that creates mock implementations of Golang interfaces. It inspects source code and generates implementations of the interface that aid in testing.</p> <p>In addition to providing a number of different styles of mocks, mockery also allows users to provide their own template files that will then be rendered using a set of template data, methods, and functions that provide comprehensive typing information about the Go interface in question.</p> <p> </p>"},{"location":"#why-mockery","title":"Why mockery?","text":"<p>When you have an interface like this:</p> db.go<pre><code>type DB interface {\n    Get(val string) string\n}\n</code></pre> <p>and a function that takes this interface:</p> db_getter.go<pre><code>func getFromDB(db DB) string {\n    return db.Get(\"ice cream\")\n}\n</code></pre> <p>We can use simple configuration to generate a mock implementation for the interface:</p> .mockery.yaml<pre><code>packages:\n    github.com/org/repo:\n        interfaces:\n            DB:\n</code></pre> Bash<pre><code>$ mockery\n05 Mar 23 21:49 CST INF Starting mockery dry-run=false version=v3.0.0\n05 Mar 23 21:49 CST INF Using config: .mockery.yaml dry-run=false version=v3.0.0\n05 Mar 23 21:49 CST INF Generating mock dry-run=false interface=DB qualified-name=github.com/org/repo version=v3.0.0\n</code></pre> <p>We can then use the mock object in a test:</p> db_getter_test.go<pre><code>import (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc Test_getFromDB(t *testing.T) {\n    mockDB := NewMockDB(t)\n    mockDB.EXPECT().Get(\"ice cream\").Return(\"chocolate\").Once()\n    flavor := getFromDB(mockDB)\n    assert.Equal(t, \"chocolate\", flavor)\n}\n</code></pre>"},{"location":"#why-use-mockery","title":"Why use mockery?","text":"<ol> <li>You gain access to a number of pre-curated mock implementations that can be used in testing. This includes traditional \"mockery-style\" mocks, as well as other styles from the open source community such as from https://github.com/matryer/moq. Such mocks allow you to quickly define how the implementation should behave under test without having to manually curate your own mocks/stubs/fakes.</li> <li>Mockery benefits from a large number of performance improvements that almost all other Go code-generation projects currently have not employed. This means that it's orders of magnitude faster for large codebases.</li> <li>Mockery provides a comprehensive, centralized, flexible, and simple configuration scheme driven off of yaml instead of relying on sprawling <code>//go:generate</code> commands.</li> <li>Mockery is a code-generation framework. While its original goal is to provide mock implementations for testing purposes, users can supply their own templates to auto-generate any kind of code that needs to be based off of interfaces.</li> <li>A number of high profile companies, projects, and communities trust Mockery.</li> </ol>"},{"location":"#who-uses-mockery","title":"Who uses mockery?","text":"<ul> <li> Grafana </li> <li> Google Skia </li> <li> Google Skyzkaller </li> <li> Hashicorp </li> <li> Jaegertracing </li> <li> Splunk kafka-mq-go </li> <li> </li> <li> </li> <li> </li> <li></li> <li> eksctl </li> <li> </li> <li> Task <li> <p>Get Started</p>"},{"location":"configuration/","title":"Configuration","text":"<p>All configuration is specified in a <code>.mockery.yml</code> file. An example config file may look like this:</p> YAML<pre><code>all: False\ntemplate-data:\n  boilerplate-file: ./path/to/boilerplate.txt\ntemplate: mockery\npackages:\n  github.com/vektra/example:\n    config:\n      # Make use of the template variables to place the mock in the same\n      # directory as the original interface.\n      dir: \"{{.InterfaceDir}}\"\n      filename: \"mocks_test.go\"\n      outpkg: \"{{.PackageName}}_test\"\n      mockname: \"Mock{{.InterfaceName}}\"\n    interfaces:\n      Foo:\n      Bar:\n        config:\n          # Make it unexported instead\n          mockname: \"mock{{.InterfaceName}}\"\n      Baz:\n        # Create two mock implementations of Baz with different names.\n        configs:\n          - filename: \"mocks_baz_one_test.go\"\n            mockname: \"MockBazOne\"\n          - filename: \"mocks_baz_two_test.go\"\n            mockname: \"MockBazTwo\"\n  io:\n    config:\n      dir: path/to/io/mocks\n      filename: \"mocks_io.go\"\n</code></pre> <p>These are the highlights of the config scheme:</p> <ol> <li>The parameters are merged hierarchically</li> <li>There are a number of template variables available to generalize config values.</li> <li>The style of mock to be generated is specified using the <code>template</code> parameter.</li> </ol> <p>An output file may contain multiple mocks, but the only rule is that all the mocks in the file must come from the same package. Because of this, mocks for different packages must go in different files.</p>"},{"location":"configuration/#parameter-descriptions","title":"Parameter Descriptions","text":"name templated default description <code>all</code> <code>false</code> Generate all interfaces for the specified packages. <code>_anchors</code> <code>{}</code> Unused by mockery, but allowed in the config schema so that you may define arbitrary yaml anchors. <code>config</code> <code>\"\"</code> Set the location of the mockery config file. <code>dir</code> <code>\"mocks/{{.SrcPackagePath}}\"</code> The directory where the mock file will be outputted to. <code>exclude-subpkg-regex</code> <code>[]</code> A list of regular expressions that denote which subpackages should be excluded when <code>recursive: true</code> <code>exclude-regex</code> <code>\"\"</code> When set along with <code>include-regex</code>, then interfaces which match <code>include-regex</code> but also match <code>exclude-regex</code> will not be generated. If <code>all</code> is set, or if <code>include-regex</code> is not set, then <code>exclude-regex</code> has no effect. <code>filename</code> <code>\"mock_{{.InterfaceName}}.go\"</code> The name of the file the mock will reside in. <code>force-file-write</code> <code>false</code> When set to <code>force-file-write: true</code>, mockery will forcibly overwrite any existing files. <code>formatter</code> <code>\"goimports\"</code> The formatter to use on the rendered template. Choices are: <code>gofmt</code>, <code>goimports</code>, <code>noop</code>. <code>include-regex</code> <code>\"\"</code> When set, only interface names that match the expression will be generated. This setting is ignored if <code>all: True</code> is specified in the configuration. To further refine the interfaces generated, use <code>exclude-regex</code>. <code>log-level</code> <code>\"info\"</code> Set the level of the logger <code>mockname</code> <code>\"Mock{{.InterfaceName}}\"</code> The name of the generated mock. <code>outpkg</code> <code>\"{{.PackageName}}\"</code> Use <code>outpkg</code> to specify the package name of the generated mocks. <code>packages</code> <code>null</code> A dictionary containing configuration describing the packages and interfaces to generate mocks for. <code>pkgname</code> <code>\"{{.SrcPackageName}}\" | The</code>#!go package name` given to the generated mock files. <code>recursive</code> <code>false</code> When set to <code>true</code> on a particular package, mockery will recursively search for all sub-packages and inject those packages into the config map. <code>replace-type</code> <code>{}</code> Use this parameter to specify type replacements. <code>tags</code> <code>\"\"</code> A space-separated list of additional build tags to load packages. <code>template</code> <code>\"\"</code> The template to use. The choices are <code>moq</code>, <code>mockery</code>, or a file path provided by <code>file://path/to/file.txt</code>. <code>template-data</code> <code>{}</code> A <code>map[string]any</code> that provides arbitrary options to the template. Each template will have a different set of accepted keys. Refer to each template's documentation for more details."},{"location":"configuration/#config-templates","title":"Config Templates","text":"<p>Parameters marked as being templated have access to a number of template variables and functions.</p>"},{"location":"configuration/#variables","title":"Variables","text":"<p>The variables provided are specified in the <code>ConfigData</code> struct.</p>"},{"location":"configuration/#functions","title":"Functions","text":"<p>All of the functions defined in <code>StringManipulationFuncs</code> are available to templated parameters.</p>"},{"location":"configuration/#merging-precedence","title":"Merging Precedence","text":"<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in decreasing priority):</p> <ol> <li>Interface-specific config in <code>.mockery.yaml</code></li> <li>Package-specific config in <code>.mockery.yaml</code></li> <li>Command-line options</li> <li>Environment variables</li> <li>Top-level defaults in <code>.mockery.yaml</code></li> </ol>"},{"location":"configuration/#formatting","title":"Formatting","text":"<p>If a parameter is named <code>enable-feature</code> and we want a value of <code>True</code>, then these are the formats for each source:</p> source value command line <code>--enable-feature=true</code> Environment variable <code>MOCKERY_ENABLE_FEATURE=True</code> yaml <code>enable-feature: True</code>"},{"location":"faq/","title":"Frequently Asked Questions","text":""},{"location":"faq/#error-no-go-files-found-in-root-search-path","title":"error: <code>no go files found in root search path</code>","text":"<p>When using the <code>packages</code> feature, <code>recursive: true</code> and you have specified a package that contains no <code>*.go</code> files, mockery is unable to determine the on-disk location of the package in order to continue the recursive package search. This appears to be a limitation of the golang.org/x/tools/go/packages package that is used to parse package metadata.</p> <p>The solution is to create a <code>.go</code> file in the package's path and add a <code>package [name]</code> directive at the top. It doesn't matter what the file is called. This allows mockery to properly read package metadata.</p> <p>Discussion</p>"},{"location":"faq/#internal-error-package-without-types-was-imported","title":"internal error: package without types was imported","text":"<p>https://github.com/vektra/mockery/issues/475</p> <p>This issue indicates that you have attempted to use package in your dependency tree (whether direct or indirect) that uses Go language semantics that your currently-running Go version does not support. The solution:</p> <ol> <li>Update to the latest go version</li> <li>Delete all cached packages with <code>go clean -modcache</code></li> <li>Reinstall mockery</li> </ol> <p>Additionally, this issue only happens when compiling mockery from source, such as with <code>go install</code>. Our docs recommend not to use <code>go install</code> as the success of your build depends on the compatibility of your Go version with the semantics in use. You would not encounter this issue if using one of the installation methods that install pre-built binaries, like downloading the <code>.tar.gz</code> binaries, or through <code>brew install</code>.</p>"},{"location":"faq/#multiple-expectations-with-identical-arguments","title":"Multiple Expectations With Identical Arguments","text":"<p>There might be instances where you want a mock to return different values on successive calls that provide the same arguments. For example, we might want to test this behavior:</p> Go<pre><code>// Return \"foo\" on the first call\ngetter := NewGetter()\nassert(t, \"foo\", getter.Get(\"key\"))\n\n// Return \"bar\" on the second call\nassert(t, \"bar\", getter.Get(\"key\"))\n</code></pre> <p>This can be done by using the <code>.Once()</code> method on the mock call expectation:</p> Go<pre><code>mockGetter := NewMockGetter(t)\nmockGetter.EXPECT().Get(mock.anything).Return(\"foo\").Once()\nmockGetter.EXPECT().Get(mock.anything).Return(\"bar\").Once()\n</code></pre> <p>Or you can identify an arbitrary number of times each value should be returned:</p> Go<pre><code>mockGetter := NewMockGetter(t)\nmockGetter.EXPECT().Get(mock.anything).Return(\"foo\").Times(4)\nmockGetter.EXPECT().Get(mock.anything).Return(\"bar\").Times(2)\n</code></pre> <p>Note that with proper Go support in your IDE, all the available methods are self-documented in autocompletion help contexts.</p>"},{"location":"faq/#variadic-arguments","title":"Variadic Arguments","text":"<p>Consider if we have a function <code>func Bar(message ...string) error</code>. A typical assertion might look like this:</p> Go<pre><code>func TestFoo(t *testing.T) {\n  m := NewMockFoo(t)\n  m.On(\"Bar\", \"hello\", \"world\").Return(nil)\n</code></pre> <p>We might also want to make an assertion that says \"any number of variadic arguments\":</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>However, what we've given to mockery is ambiguous because it is impossible to distinguish between these two intentions:</p> <ol> <li>Any number of variadic arguments of any value</li> <li>A single variadic argument of any value</li> </ol> <p>This is fixed in #359 where you can provide <code>unroll-variadic: False</code> to get back to the old behavior. Thus, if you want to assert (1), you can then do:</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>If you want to assert (2), you must set <code>unroll-variadic: True</code>. Then this assertion's intention will be modified to mean the second case:</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>An upstream patch to <code>testify</code> is currently underway to allow passing <code>mock.Anything</code> directly to the variadic slice: https://github.com/stretchr/testify/pull/1348</p> <p>If this is merged, it would become possible to describe the above two cases respectively:</p> Go<pre><code>// case 1\nm.On(\"Bar\", mock.Anything).Return(nil)\n// case 2\nm.On(\"Bar\", []interface{}{mock.Anything}).Return(nil)\n</code></pre> <p>References:</p> <ul> <li>https://github.com/vektra/mockery/pull/359</li> <li>https://github.com/vektra/mockery/pull/123</li> <li>https://github.com/vektra/mockery/pull/550</li> <li>https://github.com/vektra/mockery/issues/541</li> </ul>"},{"location":"faq/#semantic-versioning","title":"Semantic Versioning","text":"<p>The versioning in this project applies only to the behavior of the mockery binary itself. This project explicitly does not promise a stable internal API, but rather a stable executable. The versioning applies to the following:</p> <ol> <li>CLI arguments.</li> <li>Parsing of Go code. New features in the Go language will be supported in a backwards-compatible manner, except during major version bumps.</li> <li>Behavior of mock objects. Mock objects can be considered to be part of the public API.</li> <li>Behavior of mockery given a set of arguments.</li> </ol> <p>What the version does not track:</p> <ol> <li>The interfaces, objects, methods etc. in the vektra/mockery package.</li> <li>Compatibility of <code>go get</code>-ing mockery with new or old versions of Go.</li> </ol>"},{"location":"faq/#mocking-interfaces-in-main","title":"Mocking interfaces in <code>main</code>","text":"<p>When your interfaces are in the main package, you should supply the <code>--inpackage</code> flag. This will generate mocks in the same package as the target code, avoiding import issues.</p>"},{"location":"faq/#mockery-fails-to-run-when-mockery_version-environment-variable-is-set","title":"mockery fails to run when <code>MOCKERY_VERSION</code> environment variable is set","text":"<p>This issue was first highlighted in this GitHub issue.</p> <p>mockery uses the viper package for configuration mapping and parsing. Viper is set to automatically search for all config variables specified in its config struct. One of the config variables is named <code>version</code>, which gets mapped to an environment variable called <code>MOCKERY_VERSION</code>. If you set this environment variable, mockery attempts to parse it into the <code>version</code> bool config.</p> <p>This is an adverse effect of how our config parsing is set up. The solution is to rename your environment variable to something other than <code>MOCKERY_VERSION</code>.</p>"},{"location":"installation/","title":"Getting Started","text":""},{"location":"installation/#installation","title":"Installation","text":""},{"location":"installation/#github-release-recommended","title":"GitHub Release recommended","text":"<p>Visit the releases page to download one of the pre-built binaries for your platform.</p>"},{"location":"installation/#go-install","title":"go install","text":"<p>Supported, but not recommended: see wiki page and related discussions.</p> <p>Warning</p> <p>Do not use <code>@latest</code> as this will pull from the latest, potentially untagged, commit on master.</p>"},{"location":"installation/#docker","title":"Docker","text":"<p>Use the Docker image</p> Text Only<pre><code>docker pull vektra/mockery\n</code></pre> <p>Generate all the mocks for your project:</p> Text Only<pre><code>docker run -v \"$PWD\":/src -w /src vektra/mockery --all\n</code></pre>"},{"location":"installation/#homebrew","title":"Homebrew","text":"<p>Install through brew</p> Text Only<pre><code>brew install mockery\nbrew upgrade mockery\n</code></pre>"},{"location":"replace-type/","title":"replace-type","text":""},{"location":"replace-type/#description","title":"Description","text":"<p>The <code>replace-type:</code> parameter allows you to replace a type in the generated mocks with another type. Take for example the following interface:</p> interface.go<pre><code>package replace_type\n\nimport (\n    \"github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt1\"\n    \"github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt2\"\n)\n\ntype RType interface {\n    Replace1(f rt1.RType1)\n}\n</code></pre> <p>You can selectively replace the <code>rt1.RType1</code> with a new type if so desired. For example:</p> .mockery.yml<pre><code>replace-type:\n  github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt1:\n    RType1:\n      pkg-path: github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt2\n      type-name: RType2\n</code></pre> <p>The mock will now replace all instances of <code>rt1.RType1</code> with <code>rt2.RType2</code>. You can see the before and after of <code>mockery</code>-style mocks:</p> beforeafter Go<pre><code>// Replace2 provides a mock function for the type RTypeReplaced1\nfunc (_mock *RTypeReplaced1) Replace1(f rt1.RType1) {\n    _mock.Called(f)\n    return\n}\n</code></pre> Go<pre><code>// Replace2 provides a mock function for the type RTypeReplaced1\nfunc (_mock *RTypeReplaced1) Replace1(f rt2.RType2) {\n    _mock.Called(f)\n    return\n}\n</code></pre>"},{"location":"replace-type/#background","title":"Background","text":"<p>This parameter is useful if you need to need to work around packages that use internal types. Take for example the situation found here, noted by RangelReale.</p>"},{"location":"running/","title":"Running","text":"<p>If your <code>.mockery.yaml</code> file has been populated with the packages and interfaces you want mocked, mockery can be run with no arguments. Take for example how the mockery project itself is configured:</p> YAML<pre><code>quiet: False\nkeeptree: True\ndisable-version-string: True\nwith-expecter: True\nmockname: \"{{.InterfaceName}}\"\nfilename: \"{{.MockName}}.go\"\noutpkg: mocks\npackages:\n  github.com/vektra/mockery/v3/pkg:\n    interfaces:\n      TypesPackage:\n# Lots more config...\n</code></pre> <p>From anywhere within your repo, you can simply call <code>mockery</code> once, and it will find your config either by respecting the <code>config</code> path you gave it, or by searching upwards from the current working directory.</p> Bash<pre><code>mockery\n08 Jul 23 01:40 EDT INF Starting mockery dry-run=false version=v2.31.0\n08 Jul 23 01:40 EDT INF Using config: /Users/landonclipp/git/LandonTClipp/mockery/.mockery.yaml dry-run=false version=v2.31.0\n</code></pre> <p>Command line arguments</p> <p>It is valid to specify arguments from the command line. The configuration precedence is specified in the Configuration docs.</p>"},{"location":"template-matryer/","title":"matryer/moq","text":""},{"location":"template-matryer/#description","title":"Description","text":"Interface<code>.mockery.yml</code><code>mocks_moq.go</code>Example Usage Go<pre><code>package test\n\ntype Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre> YAML<pre><code>template: matryer\npackages:\n    github.com/vektra/mockery/v3/pkg/fixtures:\n        config:\n            dir: \"{{.InterfaceDir}}\"\n            filename: \"mocks_moq.go\"\n            pkgname: \"test\"\n            mockname: \"Moq{{.InterfaceName}}\"\n        interfaces:\n            Requester:\n</code></pre> Go<pre><code>// Code generated by mockery; DO NOT EDIT.\n// github.com/vektra/mockery\n\npackage test\n\nimport (\n    \"sync\"\n)\n\n// Ensure, that MoqRequester does implement Requester.\n// If this is not the case, regenerate this file with moq.\nvar _ Requester = &amp;MoqRequester{}\n\n// MoqRequester is a mock implementation of Requester.\n//\n//  func TestSomethingThatUsesRequester(t *testing.T) {\n//\n//      // make and configure a mocked Requester\n//      mockedRequester := &amp;MoqRequester{\n//          GetFunc: func(path string) (string, error) {\n//              panic(\"mock out the Get method\")\n//          },\n//      }\n//\n//      // use mockedRequester in code that requires Requester\n//      // and then make assertions.\n//\n//  }\ntype MoqRequester struct {\n    // GetFunc mocks the Get method.\n    GetFunc func(path string) (string, error)\n\n    // calls tracks calls to the methods.\n    calls struct {\n        // Get holds details about calls to the Get method.\n        Get []struct {\n            // Path is the path argument value.\n            Path string\n        }\n    }\n    lockGet sync.RWMutex\n}\n\n// Get calls GetFunc.\nfunc (mock *MoqRequester) Get(path string) (string, error) {\n   // ...\n}\n\n// GetCalls gets all the calls that were made to Get.\n// Check the length with:\n//\n//  len(mockedRequester.GetCalls())\nfunc (mock *MoqRequester) GetCalls() []struct {\n    Path string\n} {\n    // ...\n}\n</code></pre> Go<pre><code>func TestRequesterMoq(t *testing.T) {\n    m := &amp;MoqRequester{\n        GetFunc: func(path string) (string, error) {\n            fmt.Printf(\"Go path: %s\\n\", path)\n            return path + \"/foo\", nil\n        },\n    }\n    result, err := m.Get(\"/path\")\n    assert.NoError(t, err)\n    assert.Equal(t, \"/path/foo\", result)\n}\n</code></pre> <p>Moq-style mocks are far simpler, and probably more intuitive, than testify-style mocks. All that's needed is to define the function that will be run when the mock's method is called.</p>"},{"location":"template-matryer/#template-data","title":"<code>template-data</code>","text":"<p><code>moq</code> accepts the following <code>template-data:</code> keys:</p> key type description <code>boilerplate-file</code> <code>string</code> Specify a path to a file that contains comments you want displayed at the top of all generated mock files. This is commonly used to display license headers at the top of your source code. <code>mock-build-tags</code> <code>\"\"</code> Set the build tags of the generated mocks. Read more about the format. <code>skip-ensure</code> <code>bool</code> Suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package. <code>stub-impl</code> <code>bool</code> Return zero values when no mock implementation is provided, do not panic. <code>with-resets</code> <code>bool</code> Generates methods that allow resetting calls made to the mocks."},{"location":"template-testify/","title":"Mockery","text":"<p>Features for <code>template: testify</code>.</p> <p>Choosing this template will render a traditional \"mockery-style\" template. The section below shows what will be rendered for the given interface.</p>"},{"location":"template-testify/#description","title":"Description","text":"Interface<code>.mockery.yml</code><code>mocks.go</code>Example Usage Go<pre><code>package test\n\ntype Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre> YAML<pre><code>template: testify\npackages:\n    github.com/vektra/mockery/v3/pkg/fixtures:\n        config:\n            dir: \"{{.InterfaceDir}}\"\n            filename: \"mocks.go\"\n            pkgname: \"test\"\n            mockname: \"Mock{{.InterfaceName}}\"\n        interfaces:\n            Requester:\n</code></pre> Go<pre><code>// Code generated by mockery; DO NOT EDIT.\n// github.com/vektra/mockery\n\npackage test\n\nimport (\n    mock \"github.com/stretchr/testify/mock\"\n)\n\n\n// NewRequester creates a new instance of Requester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.\n// The first argument is typically a *testing.T value.\nfunc NewRequester (t interface {\n    mock.TestingT\n    Cleanup(func())\n}) *Requester {\n   // ...\n}\n\n\n// Requester is an autogenerated mock type for the Requester type\ntype Requester struct {\n    mock.Mock\n}\n\ntype Requester_Expecter struct {\n    mock *mock.Mock\n}\n\nfunc (_m *Requester) EXPECT() *Requester_Expecter {\n    // ...\n}\n\n\n\n// Get provides a mock function for the type Requester\nfunc (_mock *Requester) Get(path string) (string, error) {\n    // ...\n}\n\n\n\n// Requester_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'\ntype Requester_Get_Call struct {\n    *mock.Call\n}\n\n\n\n// Get is a helper method to define mock.On call\n//  - path\nfunc (_e *Requester_Expecter) Get(path interface{}, ) *Requester_Get_Call {\n    // ...\n}\n\nfunc (_c *Requester_Get_Call) Run(run func(path string)) *Requester_Get_Call {\n   // ...\n}\n\nfunc (_c *Requester_Get_Call) Return(s string, err error) *Requester_Get_Call {\n    // ...\n}\n\nfunc (_c *Requester_Get_Call) RunAndReturn(run func(path string)(string, error)) *Requester_Get_Call {\n    // ...\n}\n</code></pre> Go<pre><code>package test\n\nimport (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRequesterMock(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(\"foo\").Return(\"bar\", nil).Once()\n    retString, err := m.Get(\"foo\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"bar\")\n}\n</code></pre> <p>As you can see, this mock utilizes <code>github.com/stretchr/testify</code> under the hood and registers call expectations with testify. When the mock receives a call to <code>Get()</code>, it retrieves the expected value from testify to be returned.</p> <p>This style of mock also has other interesting methods:</p> <code>Run()</code><code>RunAndReturn()</code><code>github.com/stretchr/testify/mock.Mock</code> <p>Run a side effect when the argument matches.</p> Go<pre><code>func TestRequesterMockRun(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).Return(\"\", nil)\n    m.EXPECT().Get(mock.Anything).Run(func(path string) {\n        fmt.Printf(\"Side effect! Argument is: %s\", path)\n    })\n    retString, err := m.Get(\"hello\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"\")\n}\n</code></pre> <p>Run a function to perform side-effects, and return the result of the function.</p> Go<pre><code>func TestRequesterMockRunAndReturn(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).RunAndReturn(func(path string) (string, error) {\n        return path + \" world\", nil\n    })\n    retString, err := m.Get(\"hello\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"hello world\")\n}\n</code></pre> <p>Because the mock embeds the testify <code>Mock</code> object, you can all any methods on that as well.</p> Go<pre><code>func TestRequesterMockTestifyEmbed(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).Return(\"\", nil).Twice()\n    m.Get(\"hello\")\n    m.Get(\"world\")\n    assert.Equal(t, len(m.Mock.Calls), 2)\n}\n</code></pre>"},{"location":"template-testify/#template-data","title":"<code>template-data</code>","text":"key type description <code>boilerplate-file</code> <code>string</code> Specify a path to a file that contains comments you want displayed at the top of all generated mock files. This is commonly used to display license headers at the top of your source code. <code>mock-build-tags</code> <code>\"\"</code> Set the build tags of the generated mocks. Read more about the format. <code>unroll-variadic</code> <code>bool</code> If set to <code>unroll-variadic: true</code>, will expand the variadic argument to testify using the <code>...</code> syntax. See notes for more details."},{"location":"template-testify/#features","title":"Features","text":""},{"location":"template-testify/#replace-types","title":"Replace Types","text":"<p> v2.23.0</p> <p>The <code>replace-type</code> parameter allows adding a list of type replacements to be made in package and/or type names. This can help overcome issues like usage of type aliases that point to internal packages.</p> <p>The format of the parameter is:</p> <p><code>originalPackagePath.originalTypeName=newPackageName:newPackagePath.newTypeName</code></p> <p>For example:</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz=baz:github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>This will replace any imported named <code>\"github.com/vektra/mockery/v3/baz/internal/foo\"</code> with <code>baz \"github.com/vektra/mockery/v3/baz\"</code>. The alias is defined with <code>:</code> before the package name. Also, the <code>InternalBaz</code> type that comes from this package will be renamed to <code>baz.Baz</code>.</p> <p>This next example fixes a common problem of type aliases that point to an internal package.</p> <p><code>cloud.google.com/go/pubsub.Message</code> is a type alias defined like this:</p> Go<pre><code>import (\n    ipubsub \"cloud.google.com/go/internal/pubsub\"\n)\n\ntype Message = ipubsub.Message\n</code></pre> <p>The Go parser that mockery uses doesn't provide a way to detect this alias and sends the application the package and type name of the type in the internal package, which will not work.</p> <p>We can use <code>replace-type</code> with only the package part to replace any import of <code>cloud.google.com/go/internal/pubsub</code> to <code>cloud.google.com/go/pubsub</code>. We don't need to change the alias or type name in this case, because they are <code>pubsub</code> and <code>Message</code> in both cases.</p> Bash<pre><code>mockery --replace-type cloud.google.com/go/internal/pubsub=cloud.google.com/go/pubsub\n</code></pre> <p>Original source:</p> Go<pre><code>import (\n    \"cloud.google.com/go/pubsub\"\n)\n\ntype Handler struct {\n    HandleMessage(m pubsub.Message) error\n}\n</code></pre> <p>Invalid mock generated without this parameter (points to an <code>internal</code> folder):</p> Go<pre><code>import (\n    mock \"github.com/stretchr/testify/mock\"\n\n    pubsub \"cloud.google.com/go/internal/pubsub\"\n)\n\nfunc (_m *Handler) HandleMessage(m pubsub.Message) error {\n    // ...\n    return nil\n}\n</code></pre> <p>Correct mock generated with this parameter.</p> Go<pre><code>import (\n    mock \"github.com/stretchr/testify/mock\"\n\n    pubsub \"cloud.google.com/go/pubsub\"\n)\n\nfunc (_m *Handler) HandleMessage(m pubsub.Message) error {\n    // ...\n    return nil\n}\n</code></pre> <p>Generic type constraints can also be replaced by targeting the changed parameter with the square bracket notation on the left-hand side.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[T]=github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz[T baz.Baz] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n</code></pre> <p>If a type constraint needs to be removed and replaced with a type, target the constraint with square brackets and include a '-' in front to have it removed.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[-T]=github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz struct{}\n\nfunc (*InternalBaz) Foo() baz.Baz {}\n</code></pre> <p>When replacing a generic constraint, you can replace the type with a pointer by adding a '*' before the output type name.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[-T]=github.com/vektra/mockery/v3/baz.*Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz struct{}\n\nfunc (*InternalBaz) Foo() *baz.Baz {}\n</code></pre>"},{"location":"template-testify/#mock-constructors","title":"Mock Constructors","text":"<p> v2.11.0</p> <p>All mock objects have constructor functions. These constructors do basic test setup so that the expectations you set in the code are asserted before the test exits.</p> <p>Previously something like this would need to be done: Go<pre><code>factory := &amp;mocks.Factory{}\nfactory.Test(t) // so that mock does not panic when a method is unexpected\ndefer factory.AssertExpectations(t)\n</code></pre></p> <p>Instead, you may simply use the constructor: Go<pre><code>factory := mocks.NewFactory(t)\n</code></pre></p> <p>The constructor sets up common functionalities automatically</p> <ul> <li>The <code>AssertExpectations</code> method is registered to be called at the end of the tests via <code>t.Cleanup()</code> method.</li> <li>The testing.TB interface is registered on the <code>mock.Mock</code> so that tests don't panic when a call on the mock is unexpected.</li> </ul>"},{"location":"template-testify/#expecter-structs","title":"Expecter Structs","text":"<p> v2.10.0 \u00b7 <code>with-expecter: True</code></p> <p>Mockery now supports an \"expecter\" struct, which allows your tests to use type-safe methods to generate call expectations. When enabled through the <code>with-expecter: True</code> mockery configuration, you can enter into the expecter interface by simply calling <code>.EXPECT()</code> on your mock object.</p> <p>For example, given an interface such as Go<pre><code>type Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre></p> <p>You can use the expecter interface as such: Go<pre><code>requesterMock := mocks.NewRequester(t)\nrequesterMock.EXPECT().Get(\"some path\").Return(\"result\", nil)\n</code></pre></p> <p>A <code>RunAndReturn</code> method is also available on the expecter struct that allows you to dynamically set a return value based on the input to the mock's call.</p> Go<pre><code>requesterMock.EXPECT().\n    Get(mock.Anything).\n    RunAndReturn(func(path string) (string, error) {\n        fmt.Println(path, \"was called\")\n        return (\"result for \" + path), nil\n    })\n</code></pre> <p>Note</p> <p>Note that the types of the arguments on the <code>EXPECT</code> methods are <code>interface{}</code>, not the actual type of your interface. The reason for this is that you may want to pass <code>mock.Any</code> as an argument, which means that the argument you pass may be an arbitrary type. The types are still provided in the expecter method docstrings.</p>"},{"location":"template-testify/#return-value-providers","title":"Return Value Providers","text":"<p> v2.20.0</p> <p>Return Value Providers can be used one of two ways. You may either define a single function with the exact same signature (number and type of input and return parameters) and pass that as a single value to <code>Return</code>, or you may pass multiple values to <code>Return</code> (one for each return parameter of the mocked function.)  If you are using the second form, for each of the return values of the mocked function, <code>Return</code> needs a function which takes the same arguments as the mocked function, and returns one of the return values. For example, if the return argument signature of <code>passthrough</code> in the above example was instead <code>(string, error)</code> in the interface, <code>Return</code> would also need a second function argument to define the error value:</p> Go<pre><code>type Proxy interface {\n    passthrough(ctx context.Context, s string) (string, error)\n}\n</code></pre> <p>First form:</p> Go<pre><code>proxyMock := mocks.NewProxy(t)\nproxyMock.On(\"passthrough\", mock.AnythingOfType(\"context.Context\"), mock.AnythingOfType(\"string\")).\nReturn(\n    func(ctx context.Context, s string) (string, error) {\n        return s, nil\n    }\n)\n</code></pre> <p>Second form:</p> Go<pre><code>proxyMock := mocks.NewProxy(t)\nproxyMock.On(\"passthrough\", mock.AnythingOfType(\"context.Context\"), mock.AnythingOfType(\"string\")).\nReturn(\n    func(ctx context.Context, s string) string {\n        return s\n    },\n    func(ctx context.Context, s string) error {\n        return nil\n    },\n)\n</code></pre>"},{"location":"templates/","title":"Templates","text":"<p>Mockery, in its essence, renders templates. This project provides a number of pre-curated templates that you can select with the <code>template:</code> config parameter.</p>"},{"location":"templates/#template-options","title":"Template Options","text":""},{"location":"templates/#template-testify","title":"<code>template: \"testify\"</code>","text":"<p><code>testify</code> templates generate powerful, testify-based mock objects. They allow you to create expectations using argument-to-return-value matching logic.</p> Go<pre><code>package test\n\nimport (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRequesterMock(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(\"foo\").Return(\"bar\", nil).Once()\n    retString, err := m.Get(\"foo\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"bar\")\n}\n</code></pre>"},{"location":"templates/#template-matryer","title":"<code>template: \"matryer\"</code>","text":"<p><code>matryer</code> templates draw from the mocks generated from the project at https://github.com/matryer/moq. This project was folded into mockery, and thus moq-style mocks can be natively generated from within mockery.</p> <p>Mocks generated using this template allow you to define precise functions to be run. Example:</p> Go<pre><code>func TestRequesterMoq(t *testing.T) {\n    m := &amp;MoqRequester{\n        GetFunc: func(path string) (string, error) {\n            fmt.Printf(\"Go path: %s\\n\", path)\n            return path + \"/foo\", nil\n        },\n    }\n    result, err := m.Get(\"/path\")\n    assert.NoError(t, err)\n    assert.Equal(t, \"/path/foo\", result)\n}\n</code></pre>"},{"location":"templates/#template-file","title":"<code>template: \"file://</code>","text":"<p>You may also provide mockery a path to your own file using the <code>file://</code> protocol specifier. The string after <code>file://</code> will be the relative or absolute path of your template.</p> <p>The templates are rendered with the data as shown in the section below.</p> <p>You can see examples of how the mockery project utilizes the template system to generate the different mock styles:</p> <ul> <li><code>moq.templ</code></li> <li><code>mockery.templ</code></li> </ul>"},{"location":"templates/#data-provided-to-templates","title":"Data Provided To Templates","text":"<p>Mockery has two separate template instances: one for the <code>.mockery.yml</code> file, and one for the mock templates. Each instance has a different set of variables and functions available to it. All functions are pipeline-compatible.</p>"},{"location":"templates/#mockeryyml","title":"<code>.mockery.yml</code>","text":"<p>As seen in the configuration section, mockery configuration has template variables and methods available to it.</p>"},{"location":"templates/#functions","title":"Functions","text":"<p>Functions provided are in the <code>StringManipulationFuncs</code> variable.</p>"},{"location":"templates/#variables","title":"Variables","text":"<p>The variables available are defined in the <code>template.ConfigData</code> struct.</p>"},{"location":"templates/#template-files","title":"Template Files","text":""},{"location":"templates/#functions_1","title":"Functions","text":"<p>Template files have both <code>StringManipulationFuncs</code> and <code>TemplateMockFuncs</code> available as functions.</p>"},{"location":"templates/#variables_1","title":"Variables","text":"<p>The template is supplied with the <code>template.Data</code> struct. Some attributes return types such as <code>template.MockData</code> and <code>template.Package</code> which themselves contain methods that may also be called.</p>"},{"location":"v3/","title":"v3 Release","text":"<p>Mockery releases version 3 of the project that provides a number of high-profile benefits over v2:</p> <ol> <li>Allows generation of <code>moq</code>-style templates. The https://github.com/matryer/moq project is being folded into mockery to combine the speed and configuration flexibility of mockery with the simplicity of moq-style mocks.</li> <li>Changes the generation scheme to be entirely driven off of Go templates. This means that the data provided to templates is considered as part of the public API.</li> <li>Mockery now allows users to specify their own templates to make code generation far easier. Mockery handles the problem of parsing source code and enables you to focus on creating your own interface implementations.</li> <li>Shedding all deprecated variables and simplifying the way in which mocks are configured.</li> </ol>"},{"location":"v3/#v2-migration","title":"v2 Migration","text":"<p>Construction</p> <p>This section is under construction.</p>"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"mockery","text":"<p>Alpha Test</p> <p>Mockery <code>v3</code> is currently in alpha and should not be used for production.</p> <p>Mockery is a project that creates mock implementations of Golang interfaces. It inspects source code and generates implementations of the interface that aid in testing.</p> <p>In addition to providing a number of different styles of mocks, mockery also allows users to provide their own template files that will then be rendered using a set of template data, methods, and functions that provide comprehensive typing information about the Go interface in question.</p> <p> </p>"},{"location":"#why-mockery","title":"Why mockery?","text":"<p>When you have an interface like this:</p> db.go<pre><code>type DB interface {\n    Get(val string) string\n}\n</code></pre> <p>and a function that takes this interface:</p> db_getter.go<pre><code>func getFromDB(db DB) string {\n    return db.Get(\"ice cream\")\n}\n</code></pre> <p>We can use simple configuration to generate a mock implementation for the interface:</p> .mockery.yaml<pre><code>packages:\n    github.com/org/repo:\n        interfaces:\n            DB:\n</code></pre> Bash<pre><code>$ mockery\n05 Mar 23 21:49 CST INF Starting mockery dry-run=false version=v3.0.0\n05 Mar 23 21:49 CST INF Using config: .mockery.yaml dry-run=false version=v3.0.0\n05 Mar 23 21:49 CST INF Generating mock dry-run=false interface=DB qualified-name=github.com/org/repo version=v3.0.0\n</code></pre> <p>We can then use the mock object in a test:</p> db_getter_test.go<pre><code>import (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc Test_getFromDB(t *testing.T) {\n    mockDB := NewMockDB(t)\n    mockDB.EXPECT().Get(\"ice cream\").Return(\"chocolate\").Once()\n    flavor := getFromDB(mockDB)\n    assert.Equal(t, \"chocolate\", flavor)\n}\n</code></pre>"},{"location":"#why-use-mockery","title":"Why use mockery?","text":"<ol> <li>You gain access to a number of pre-curated mock implementations that can be used in testing. This includes traditional \"mockery-style\" mocks, as well as other styles from the open source community such as from https://github.com/matryer/moq. Such mocks allow you to quickly define how the implementation should behave under test without having to manually curate your own mocks/stubs/fakes.</li> <li>Mockery benefits from a large number of performance improvements that almost all other Go code-generation projects currently have not employed. This means that it's orders of magnitude faster for large codebases.</li> <li>Mockery provides a comprehensive, centralized, flexible, and simple configuration scheme driven off of yaml instead of relying on sprawling <code>//go:generate</code> commands.</li> <li>Mockery is a code-generation framework. While its original goal is to provide mock implementations for testing purposes, users can supply their own templates to auto-generate any kind of code that needs to be based off of interfaces.</li> <li>A number of high profile companies, projects, and communities trust Mockery.</li> </ol>"},{"location":"#who-uses-mockery","title":"Who uses mockery?","text":"<ul> <li> Grafana </li> <li> Google Skia </li> <li> Google Skyzkaller </li> <li> Hashicorp </li> <li> Jaegertracing </li> <li> Splunk kafka-mq-go </li> <li> </li> <li> </li> <li> </li> <li></li> <li> eksctl </li> <li> </li> <li> Task <li> <p>Get Started</p>"},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#example","title":"Example","text":"<p>All configuration is specified in a <code>.mockery.yml</code> file. An example config file may look like this:</p> YAML<pre><code>all: False\ntemplate-data:\n  boilerplate-file: ./path/to/boilerplate.txt\ntemplate: mockery\npackages:\n  github.com/vektra/example:\n    config:\n      # Make use of the template variables to place the mock in the same\n      # directory as the original interface.\n      dir: \"{{.InterfaceDir}}\"\n      filename: \"mocks_test.go\"\n      outpkg: \"{{.PackageName}}_test\"\n      mockname: \"Mock{{.InterfaceName}}\"\n    interfaces:\n      Foo:\n      Bar:\n        config:\n          # Make it unexported instead\n          mockname: \"mock{{.InterfaceName}}\"\n      Baz:\n        # Create two mock implementations of Baz with different names.\n        configs:\n          - filename: \"mocks_baz_one_test.go\"\n            mockname: \"MockBazOne\"\n          - filename: \"mocks_baz_two_test.go\"\n            mockname: \"MockBazTwo\"\n  io:\n    config:\n      dir: path/to/io/mocks\n      filename: \"mocks_io.go\"\n</code></pre> <p>These are the highlights of the config scheme:</p> <ol> <li>The parameters are merged hierarchically</li> <li>There are a number of template variables available to generalize config values.</li> <li>The style of mock to be generated is specified using the <code>template</code> parameter.</li> </ol> <p>An output file may contain multiple mocks, but the only rule is that all the mocks in the file must come from the same package. Because of this, mocks for different packages must go in different files.</p>"},{"location":"configuration/#parameter-descriptions","title":"Parameter Descriptions","text":"name templated default description <code>all</code> <code>false</code> Generate all interfaces for the specified packages. <code>_anchors</code> <code>{}</code> Unused by mockery, but allowed in the config schema so that you may define arbitrary yaml anchors. <code>config</code> <code>\"\"</code> Set the location of the mockery config file. <code>dir</code> <code>\"mocks/{{.SrcPackagePath}}\"</code> The directory where the mock file will be outputted to. <code>exclude-subpkg-regex</code> <code>[]</code> A list of regular expressions that denote which subpackages should be excluded when <code>recursive: true</code> <code>exclude-regex</code> <code>\"\"</code> When set along with <code>include-regex</code>, then interfaces which match <code>include-regex</code> but also match <code>exclude-regex</code> will not be generated. If <code>all</code> is set, or if <code>include-regex</code> is not set, then <code>exclude-regex</code> has no effect. <code>filename</code> <code>\"mock_{{.InterfaceName}}.go\"</code> The name of the file the mock will reside in. <code>force-file-write</code> <code>false</code> When set to <code>force-file-write: true</code>, mockery will forcibly overwrite any existing files. <code>formatter</code> <code>\"goimports\"</code> The formatter to use on the rendered template. Choices are: <code>gofmt</code>, <code>goimports</code>, <code>noop</code>. <code>include-regex</code> <code>\"\"</code> When set, only interface names that match the expression will be generated. This setting is ignored if <code>all: True</code> is specified in the configuration. To further refine the interfaces generated, use <code>exclude-regex</code>. <code>log-level</code> <code>\"info\"</code> Set the level of the logger <code>mockname</code> <code>\"Mock{{.InterfaceName}}\"</code> The name of the generated mock. <code>outpkg</code> <code>\"{{.PackageName}}\"</code> Use <code>outpkg</code> to specify the package name of the generated mocks. <code>packages</code> <code>null</code> A dictionary containing configuration describing the packages and interfaces to generate mocks for. <code>pkgname</code> <code>\"{{.SrcPackageName}}\" | The</code>#!go package name` given to the generated mock files. <code>recursive</code> <code>false</code> When set to <code>true</code> on a particular package, mockery will recursively search for all sub-packages and inject those packages into the config map. <code>replace-type</code> <code>{}</code> Use this parameter to specify type replacements. <code>tags</code> <code>\"\"</code> A space-separated list of additional build tags to load packages. <code>template</code> <code>\"\"</code> The template to use. The choices are <code>moq</code>, <code>mockery</code>, or a file path provided by <code>file://path/to/file.txt</code>. <code>template-data</code> <code>{}</code> A <code>map[string]any</code> that provides arbitrary options to the template. Each template will have a different set of accepted keys. Refer to each template's documentation for more details."},{"location":"configuration/#templates","title":"Templates","text":"<p>Parameters marked as being templated have access to a number of template variables and functions through the Go <code>text/template</code> system.</p>"},{"location":"configuration/#variables","title":"Variables","text":"<p>The variables provided are specified in the <code>config.Data</code> struct.</p>"},{"location":"configuration/#functions","title":"Functions","text":"<p>All of the functions defined in <code>StringManipulationFuncs</code> are available to templated parameters.</p>"},{"location":"configuration/#merging-precedence","title":"Merging Precedence","text":"<p>The configuration applied to a specific mocked interface is merged according to the following precedence (in increasing priority):</p> <ol> <li>Top-level defaults in <code>.mockery.yaml</code></li> <li>Environment variables</li> <li>Command-line options</li> <li>Package-specific config in <code>.mockery.yaml</code></li> <li>Interface-specific config in <code>.mockery.yaml</code></li> </ol>"},{"location":"configuration/#formatting","title":"Formatting","text":"<p>If a parameter is named <code>enable-feature</code> and we want a value of <code>True</code>, then these are the formats for each source:</p> source value command line <code>--enable-feature=true</code> Environment variable <code>MOCKERY_ENABLE_FEATURE=True</code> yaml <code>enable-feature: True</code>"},{"location":"faq/","title":"Frequently Asked Questions","text":""},{"location":"faq/#error-no-go-files-found-in-root-search-path","title":"error: <code>no go files found in root search path</code>","text":"<p>When using the <code>packages</code> feature, <code>recursive: true</code> and you have specified a package that contains no <code>*.go</code> files, mockery is unable to determine the on-disk location of the package in order to continue the recursive package search. This appears to be a limitation of the golang.org/x/tools/go/packages package that is used to parse package metadata.</p> <p>The solution is to create a <code>.go</code> file in the package's path and add a <code>package [name]</code> directive at the top. It doesn't matter what the file is called. This allows mockery to properly read package metadata.</p> <p>Discussion</p>"},{"location":"faq/#internal-error-package-without-types-was-imported","title":"internal error: package without types was imported","text":"<p>https://github.com/vektra/mockery/issues/475</p> <p>This issue indicates that you have attempted to use package in your dependency tree (whether direct or indirect) that uses Go language semantics that your currently-running Go version does not support. The solution:</p> <ol> <li>Update to the latest go version</li> <li>Delete all cached packages with <code>go clean -modcache</code></li> <li>Reinstall mockery</li> </ol> <p>Additionally, this issue only happens when compiling mockery from source, such as with <code>go install</code>. Our docs recommend not to use <code>go install</code> as the success of your build depends on the compatibility of your Go version with the semantics in use. You would not encounter this issue if using one of the installation methods that install pre-built binaries, like downloading the <code>.tar.gz</code> binaries, or through <code>brew install</code>.</p>"},{"location":"faq/#multiple-expectations-with-identical-arguments","title":"Multiple Expectations With Identical Arguments","text":"<p>There might be instances where you want a mock to return different values on successive calls that provide the same arguments. For example, we might want to test this behavior:</p> Go<pre><code>// Return \"foo\" on the first call\ngetter := NewGetter()\nassert(t, \"foo\", getter.Get(\"key\"))\n\n// Return \"bar\" on the second call\nassert(t, \"bar\", getter.Get(\"key\"))\n</code></pre> <p>This can be done by using the <code>.Once()</code> method on the mock call expectation:</p> Go<pre><code>mockGetter := NewMockGetter(t)\nmockGetter.EXPECT().Get(mock.anything).Return(\"foo\").Once()\nmockGetter.EXPECT().Get(mock.anything).Return(\"bar\").Once()\n</code></pre> <p>Or you can identify an arbitrary number of times each value should be returned:</p> Go<pre><code>mockGetter := NewMockGetter(t)\nmockGetter.EXPECT().Get(mock.anything).Return(\"foo\").Times(4)\nmockGetter.EXPECT().Get(mock.anything).Return(\"bar\").Times(2)\n</code></pre> <p>Note that with proper Go support in your IDE, all the available methods are self-documented in autocompletion help contexts.</p>"},{"location":"faq/#variadic-arguments","title":"Variadic Arguments","text":"<p>Consider if we have a function <code>func Bar(message ...string) error</code>. A typical assertion might look like this:</p> Go<pre><code>func TestFoo(t *testing.T) {\n  m := NewMockFoo(t)\n  m.On(\"Bar\", \"hello\", \"world\").Return(nil)\n</code></pre> <p>We might also want to make an assertion that says \"any number of variadic arguments\":</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>However, what we've given to mockery is ambiguous because it is impossible to distinguish between these two intentions:</p> <ol> <li>Any number of variadic arguments of any value</li> <li>A single variadic argument of any value</li> </ol> <p>This is fixed in #359 where you can provide <code>unroll-variadic: False</code> to get back to the old behavior. Thus, if you want to assert (1), you can then do:</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>If you want to assert (2), you must set <code>unroll-variadic: True</code>. Then this assertion's intention will be modified to mean the second case:</p> Go<pre><code>m.On(\"Bar\", mock.Anything).Return(nil)\n</code></pre> <p>An upstream patch to <code>testify</code> is currently underway to allow passing <code>mock.Anything</code> directly to the variadic slice: https://github.com/stretchr/testify/pull/1348</p> <p>If this is merged, it would become possible to describe the above two cases respectively:</p> Go<pre><code>// case 1\nm.On(\"Bar\", mock.Anything).Return(nil)\n// case 2\nm.On(\"Bar\", []interface{}{mock.Anything}).Return(nil)\n</code></pre> <p>References:</p> <ul> <li>https://github.com/vektra/mockery/pull/359</li> <li>https://github.com/vektra/mockery/pull/123</li> <li>https://github.com/vektra/mockery/pull/550</li> <li>https://github.com/vektra/mockery/issues/541</li> </ul>"},{"location":"faq/#semantic-versioning","title":"Semantic Versioning","text":"<p>The versioning in this project applies only to the behavior of the mockery binary itself. This project explicitly does not promise a stable internal API, but rather a stable executable. The versioning applies to the following:</p> <ol> <li>CLI arguments.</li> <li>Parsing of Go code. New features in the Go language will be supported in a backwards-compatible manner, except during major version bumps.</li> <li>Behavior of mock objects. Mock objects can be considered to be part of the public API.</li> <li>Behavior of mockery given a set of arguments.</li> </ol> <p>What the version does not track:</p> <ol> <li>The interfaces, objects, methods etc. in the vektra/mockery package.</li> <li>Compatibility of <code>go get</code>-ing mockery with new or old versions of Go.</li> </ol>"},{"location":"faq/#mocking-interfaces-in-main","title":"Mocking interfaces in <code>main</code>","text":"<p>When your interfaces are in the main package, you should supply the <code>--inpackage</code> flag. This will generate mocks in the same package as the target code, avoiding import issues.</p>"},{"location":"faq/#mockery-fails-to-run-when-mockery_version-environment-variable-is-set","title":"mockery fails to run when <code>MOCKERY_VERSION</code> environment variable is set","text":"<p>This issue was first highlighted in this GitHub issue.</p> <p>mockery uses the viper package for configuration mapping and parsing. Viper is set to automatically search for all config variables specified in its config struct. One of the config variables is named <code>version</code>, which gets mapped to an environment variable called <code>MOCKERY_VERSION</code>. If you set this environment variable, mockery attempts to parse it into the <code>version</code> bool config.</p> <p>This is an adverse effect of how our config parsing is set up. The solution is to rename your environment variable to something other than <code>MOCKERY_VERSION</code>.</p>"},{"location":"installation/","title":"Getting Started","text":""},{"location":"installation/#installation","title":"Installation","text":""},{"location":"installation/#github-release-recommended","title":"GitHub Release recommended","text":"<p>Visit the releases page to download one of the pre-built binaries for your platform.</p>"},{"location":"installation/#go-install","title":"go install","text":"<p>Supported, but not recommended: see wiki page and related discussions.</p> <p>Warning</p> <p>Do not use <code>@latest</code> as this will pull from the latest, potentially untagged, commit on master.</p>"},{"location":"installation/#docker","title":"Docker","text":"<p>Use the Docker image</p> Text Only<pre><code>docker pull vektra/mockery\n</code></pre> <p>Generate all the mocks for your project:</p> Text Only<pre><code>docker run -v \"$PWD\":/src -w /src vektra/mockery --all\n</code></pre>"},{"location":"installation/#homebrew","title":"Homebrew","text":"<p>Install through brew</p> Text Only<pre><code>brew install mockery\nbrew upgrade mockery\n</code></pre>"},{"location":"replace-type/","title":"replace-type","text":""},{"location":"replace-type/#description","title":"Description","text":"<p>The <code>replace-type:</code> parameter allows you to replace a type in the generated mocks with another type. Take for example the following interface:</p> interface.go<pre><code>package replace_type\n\nimport (\n    \"github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt1\"\n    \"github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt2\"\n)\n\ntype RType interface {\n    Replace1(f rt1.RType1)\n}\n</code></pre> <p>You can selectively replace the <code>rt1.RType1</code> with a new type if so desired. For example:</p> .mockery.yml<pre><code>replace-type:\n  github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt1:\n    RType1:\n      pkg-path: github.com/vektra/mockery/v3/internal/fixtures/example_project/replace_type/rti/rt2\n      type-name: RType2\n</code></pre> <p>The mock will now replace all instances of <code>rt1.RType1</code> with <code>rt2.RType2</code>. You can see the before and after of <code>mockery</code>-style mocks:</p> beforeafter Go<pre><code>// Replace2 provides a mock function for the type RTypeReplaced1\nfunc (_mock *RTypeReplaced1) Replace1(f rt1.RType1) {\n    _mock.Called(f)\n    return\n}\n</code></pre> Go<pre><code>// Replace2 provides a mock function for the type RTypeReplaced1\nfunc (_mock *RTypeReplaced1) Replace1(f rt2.RType2) {\n    _mock.Called(f)\n    return\n}\n</code></pre>"},{"location":"replace-type/#background","title":"Background","text":"<p>This parameter is useful if you need to need to work around packages that use internal types. Take for example the situation found here, noted by RangelReale.</p>"},{"location":"running/","title":"Running","text":"<p>If your <code>.mockery.yaml</code> file has been populated with the packages and interfaces you want mocked, mockery can be run with no arguments. Take for example how the mockery project itself is configured:</p> YAML<pre><code>quiet: False\nkeeptree: True\ndisable-version-string: True\nwith-expecter: True\nmockname: \"{{.InterfaceName}}\"\nfilename: \"{{.MockName}}.go\"\noutpkg: mocks\npackages:\n  github.com/vektra/mockery/v3/pkg:\n    interfaces:\n      TypesPackage:\n# Lots more config...\n</code></pre> <p>From anywhere within your repo, you can simply call <code>mockery</code> once, and it will find your config either by respecting the <code>config</code> path you gave it, or by searching upwards from the current working directory.</p> Bash<pre><code>mockery\n08 Jul 23 01:40 EDT INF Starting mockery dry-run=false version=v2.31.0\n08 Jul 23 01:40 EDT INF Using config: /Users/landonclipp/git/LandonTClipp/mockery/.mockery.yaml dry-run=false version=v2.31.0\n</code></pre> <p>Command line arguments</p> <p>It is valid to specify arguments from the command line. The configuration precedence is specified in the Configuration docs.</p>"},{"location":"v3/","title":"v3 Release","text":"<p>Mockery releases version 3 of the project that provides a number of high-profile benefits over v2:</p> <ol> <li>Allows generation of <code>matryer</code>-style templates. The https://github.com/matryer/moq project is being folded into mockery to combine the speed and configuration flexibility of mockery with the simplicity of moq-style mocks.</li> <li>Changes the generation scheme to be entirely driven off of Go templates. This means that the data provided to templates is considered as part of the public API.</li> <li>Mockery now allows users to specify their own templates to make code generation far easier. Mockery handles the problem of parsing source code and enables you to focus on creating your own interface implementations.</li> <li>Shedding all deprecated variables and simplifying the way in which mocks are configured.</li> </ol>"},{"location":"v3/#v2-migration","title":"v2 Migration","text":"<p>Construction</p> <p>This section is under construction.</p>"},{"location":"template/","title":"Templates","text":"<p>Mockery, in its essence, renders templates. This project provides a number of pre-curated templates that you can select with the <code>template:</code> config parameter.</p>"},{"location":"template/#template-options","title":"Template Options","text":""},{"location":"template/#template-testify","title":"<code>template: \"testify\"</code>","text":"<p><code>testify</code> templates generate powerful, testify-based mock objects. They allow you to create expectations using argument-to-return-value matching logic.</p> Go<pre><code>package test\n\nimport (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRequesterMock(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(\"foo\").Return(\"bar\", nil).Once()\n    retString, err := m.Get(\"foo\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"bar\")\n}\n</code></pre>"},{"location":"template/#template-matryer","title":"<code>template: \"matryer\"</code>","text":"<p><code>matryer</code> templates draw from the mocks generated from the project at https://github.com/matryer/moq. This project was folded into mockery, and thus moq-style mocks can be natively generated from within mockery.</p> <p>Mocks generated using this template allow you to define precise functions to be run. Example:</p> Go<pre><code>func TestRequesterMoq(t *testing.T) {\n    m := &amp;MoqRequester{\n        GetFunc: func(path string) (string, error) {\n            fmt.Printf(\"Go path: %s\\n\", path)\n            return path + \"/foo\", nil\n        },\n    }\n    result, err := m.Get(\"/path\")\n    assert.NoError(t, err)\n    assert.Equal(t, \"/path/foo\", result)\n}\n</code></pre>"},{"location":"template/#template-file","title":"<code>template: \"file://</code>","text":"<p>You may also provide mockery a path to your own file using the <code>file://</code> protocol specifier. The string after <code>file://</code> will be the relative or absolute path of your template.</p> <p>The templates are rendered with the data as shown in the section below.</p> <p>You can see examples of how the mockery project utilizes the template system to generate the different mock styles:</p> <ul> <li><code>moq.templ</code></li> <li><code>mockery.templ</code></li> </ul>"},{"location":"template/#template-data","title":"Template Data","text":""},{"location":"template/#functions","title":"Functions","text":"<p>Template files have both <code>StringManipulationFuncs</code> and <code>TemplateMockFuncs</code> available as functions.</p>"},{"location":"template/#variables","title":"Variables","text":"<p>The template is supplied with the <code>template.Data</code> struct. Some attributes return types such as <code>template.MockData</code> and <code>template.Package</code> which themselves contain methods that may also be called.</p>"},{"location":"template/matryer/","title":"matryer/moq","text":""},{"location":"template/matryer/#description","title":"Description","text":"Interface<code>.mockery.yml</code><code>mocks_moq.go</code>Example Usage Go<pre><code>package test\n\ntype Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre> YAML<pre><code>template: matryer\npackages:\n    github.com/vektra/mockery/v3/pkg/fixtures:\n        config:\n            dir: \"{{.InterfaceDir}}\"\n            filename: \"mocks_moq.go\"\n            pkgname: \"test\"\n            mockname: \"Moq{{.InterfaceName}}\"\n        interfaces:\n            Requester:\n</code></pre> Go<pre><code>// Code generated by mockery; DO NOT EDIT.\n// github.com/vektra/mockery\n\npackage test\n\nimport (\n    \"sync\"\n)\n\n// Ensure, that MoqRequester does implement Requester.\n// If this is not the case, regenerate this file with moq.\nvar _ Requester = &amp;MoqRequester{}\n\n// MoqRequester is a mock implementation of Requester.\n//\n//  func TestSomethingThatUsesRequester(t *testing.T) {\n//\n//      // make and configure a mocked Requester\n//      mockedRequester := &amp;MoqRequester{\n//          GetFunc: func(path string) (string, error) {\n//              panic(\"mock out the Get method\")\n//          },\n//      }\n//\n//      // use mockedRequester in code that requires Requester\n//      // and then make assertions.\n//\n//  }\ntype MoqRequester struct {\n    // GetFunc mocks the Get method.\n    GetFunc func(path string) (string, error)\n\n    // calls tracks calls to the methods.\n    calls struct {\n        // Get holds details about calls to the Get method.\n        Get []struct {\n            // Path is the path argument value.\n            Path string\n        }\n    }\n    lockGet sync.RWMutex\n}\n\n// Get calls GetFunc.\nfunc (mock *MoqRequester) Get(path string) (string, error) {\n   // ...\n}\n\n// GetCalls gets all the calls that were made to Get.\n// Check the length with:\n//\n//  len(mockedRequester.GetCalls())\nfunc (mock *MoqRequester) GetCalls() []struct {\n    Path string\n} {\n    // ...\n}\n</code></pre> Go<pre><code>func TestRequesterMoq(t *testing.T) {\n    m := &amp;MoqRequester{\n        GetFunc: func(path string) (string, error) {\n            fmt.Printf(\"Go path: %s\\n\", path)\n            return path + \"/foo\", nil\n        },\n    }\n    result, err := m.Get(\"/path\")\n    assert.NoError(t, err)\n    assert.Equal(t, \"/path/foo\", result)\n}\n</code></pre> <p>Moq-style mocks are far simpler, and probably more intuitive, than testify-style mocks. All that's needed is to define the function that will be run when the mock's method is called.</p>"},{"location":"template/matryer/#template-data","title":"<code>template-data</code>","text":"<p><code>moq</code> accepts the following <code>template-data:</code> keys:</p> key type description <code>boilerplate-file</code> <code>string</code> Specify a path to a file that contains comments you want displayed at the top of all generated mock files. This is commonly used to display license headers at the top of your source code. <code>mock-build-tags</code> <code>\"\"</code> Set the build tags of the generated mocks. Read more about the format. <code>skip-ensure</code> <code>bool</code> Suppress mock implementation check, avoid import cycle if mocks generated outside of the tested package. <code>stub-impl</code> <code>bool</code> Return zero values when no mock implementation is provided, do not panic. <code>with-resets</code> <code>bool</code> Generates methods that allow resetting calls made to the mocks."},{"location":"template/testify/","title":"Mockery","text":"<p>Features for <code>template: testify</code>.</p> <p>Choosing this template will render a traditional \"mockery-style\" template. The section below shows what will be rendered for the given interface.</p>"},{"location":"template/testify/#description","title":"Description","text":"Interface<code>.mockery.yml</code><code>mocks.go</code>Example Usage Go<pre><code>package test\n\ntype Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre> YAML<pre><code>template: testify\npackages:\n    github.com/vektra/mockery/v3/pkg/fixtures:\n        config:\n            dir: \"{{.InterfaceDir}}\"\n            filename: \"mocks.go\"\n            pkgname: \"test\"\n            mockname: \"Mock{{.InterfaceName}}\"\n        interfaces:\n            Requester:\n</code></pre> Go<pre><code>// Code generated by mockery; DO NOT EDIT.\n// github.com/vektra/mockery\n\npackage test\n\nimport (\n    mock \"github.com/stretchr/testify/mock\"\n)\n\n\n// NewRequester creates a new instance of Requester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.\n// The first argument is typically a *testing.T value.\nfunc NewRequester (t interface {\n    mock.TestingT\n    Cleanup(func())\n}) *Requester {\n   // ...\n}\n\n\n// Requester is an autogenerated mock type for the Requester type\ntype Requester struct {\n    mock.Mock\n}\n\ntype Requester_Expecter struct {\n    mock *mock.Mock\n}\n\nfunc (_m *Requester) EXPECT() *Requester_Expecter {\n    // ...\n}\n\n\n\n// Get provides a mock function for the type Requester\nfunc (_mock *Requester) Get(path string) (string, error) {\n    // ...\n}\n\n\n\n// Requester_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'\ntype Requester_Get_Call struct {\n    *mock.Call\n}\n\n\n\n// Get is a helper method to define mock.On call\n//  - path\nfunc (_e *Requester_Expecter) Get(path interface{}, ) *Requester_Get_Call {\n    // ...\n}\n\nfunc (_c *Requester_Get_Call) Run(run func(path string)) *Requester_Get_Call {\n   // ...\n}\n\nfunc (_c *Requester_Get_Call) Return(s string, err error) *Requester_Get_Call {\n    // ...\n}\n\nfunc (_c *Requester_Get_Call) RunAndReturn(run func(path string)(string, error)) *Requester_Get_Call {\n    // ...\n}\n</code></pre> Go<pre><code>package test\n\nimport (\n    \"testing\"\n\n    \"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRequesterMock(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(\"foo\").Return(\"bar\", nil).Once()\n    retString, err := m.Get(\"foo\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"bar\")\n}\n</code></pre> <p>As you can see, this mock utilizes <code>github.com/stretchr/testify</code> under the hood and registers call expectations with testify. When the mock receives a call to <code>Get()</code>, it retrieves the expected value from testify to be returned.</p> <p>This style of mock also has other interesting methods:</p> <code>Run()</code><code>RunAndReturn()</code><code>github.com/stretchr/testify/mock.Mock</code> <p>Run a side effect when the argument matches.</p> Go<pre><code>func TestRequesterMockRun(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).Return(\"\", nil)\n    m.EXPECT().Get(mock.Anything).Run(func(path string) {\n        fmt.Printf(\"Side effect! Argument is: %s\", path)\n    })\n    retString, err := m.Get(\"hello\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"\")\n}\n</code></pre> <p>Run a function to perform side-effects, and return the result of the function.</p> Go<pre><code>func TestRequesterMockRunAndReturn(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).RunAndReturn(func(path string) (string, error) {\n        return path + \" world\", nil\n    })\n    retString, err := m.Get(\"hello\")\n    assert.NoError(t, err)\n    assert.Equal(t, retString, \"hello world\")\n}\n</code></pre> <p>Because the mock embeds the testify <code>Mock</code> object, you can all any methods on that as well.</p> Go<pre><code>func TestRequesterMockTestifyEmbed(t *testing.T) {\n    m := NewMockRequester(t)\n    m.EXPECT().Get(mock.Anything).Return(\"\", nil).Twice()\n    m.Get(\"hello\")\n    m.Get(\"world\")\n    assert.Equal(t, len(m.Mock.Calls), 2)\n}\n</code></pre>"},{"location":"template/testify/#template-data","title":"<code>template-data</code>","text":"key type description <code>boilerplate-file</code> <code>string</code> Specify a path to a file that contains comments you want displayed at the top of all generated mock files. This is commonly used to display license headers at the top of your source code. <code>mock-build-tags</code> <code>\"\"</code> Set the build tags of the generated mocks. Read more about the format. <code>unroll-variadic</code> <code>bool</code> If set to <code>unroll-variadic: true</code>, will expand the variadic argument to testify using the <code>...</code> syntax. See notes for more details."},{"location":"template/testify/#features","title":"Features","text":""},{"location":"template/testify/#replace-types","title":"Replace Types","text":"<p> v2.23.0</p> <p>The <code>replace-type</code> parameter allows adding a list of type replacements to be made in package and/or type names. This can help overcome issues like usage of type aliases that point to internal packages.</p> <p>The format of the parameter is:</p> <p><code>originalPackagePath.originalTypeName=newPackageName:newPackagePath.newTypeName</code></p> <p>For example:</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz=baz:github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>This will replace any imported named <code>\"github.com/vektra/mockery/v3/baz/internal/foo\"</code> with <code>baz \"github.com/vektra/mockery/v3/baz\"</code>. The alias is defined with <code>:</code> before the package name. Also, the <code>InternalBaz</code> type that comes from this package will be renamed to <code>baz.Baz</code>.</p> <p>This next example fixes a common problem of type aliases that point to an internal package.</p> <p><code>cloud.google.com/go/pubsub.Message</code> is a type alias defined like this:</p> Go<pre><code>import (\n    ipubsub \"cloud.google.com/go/internal/pubsub\"\n)\n\ntype Message = ipubsub.Message\n</code></pre> <p>The Go parser that mockery uses doesn't provide a way to detect this alias and sends the application the package and type name of the type in the internal package, which will not work.</p> <p>We can use <code>replace-type</code> with only the package part to replace any import of <code>cloud.google.com/go/internal/pubsub</code> to <code>cloud.google.com/go/pubsub</code>. We don't need to change the alias or type name in this case, because they are <code>pubsub</code> and <code>Message</code> in both cases.</p> Bash<pre><code>mockery --replace-type cloud.google.com/go/internal/pubsub=cloud.google.com/go/pubsub\n</code></pre> <p>Original source:</p> Go<pre><code>import (\n    \"cloud.google.com/go/pubsub\"\n)\n\ntype Handler struct {\n    HandleMessage(m pubsub.Message) error\n}\n</code></pre> <p>Invalid mock generated without this parameter (points to an <code>internal</code> folder):</p> Go<pre><code>import (\n    mock \"github.com/stretchr/testify/mock\"\n\n    pubsub \"cloud.google.com/go/internal/pubsub\"\n)\n\nfunc (_m *Handler) HandleMessage(m pubsub.Message) error {\n    // ...\n    return nil\n}\n</code></pre> <p>Correct mock generated with this parameter.</p> Go<pre><code>import (\n    mock \"github.com/stretchr/testify/mock\"\n\n    pubsub \"cloud.google.com/go/pubsub\"\n)\n\nfunc (_m *Handler) HandleMessage(m pubsub.Message) error {\n    // ...\n    return nil\n}\n</code></pre> <p>Generic type constraints can also be replaced by targeting the changed parameter with the square bracket notation on the left-hand side.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[T]=github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz[T baz.Baz] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n</code></pre> <p>If a type constraint needs to be removed and replaced with a type, target the constraint with square brackets and include a '-' in front to have it removed.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[-T]=github.com/vektra/mockery/v3/baz.Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz struct{}\n\nfunc (*InternalBaz) Foo() baz.Baz {}\n</code></pre> <p>When replacing a generic constraint, you can replace the type with a pointer by adding a '*' before the output type name.</p> Bash<pre><code>mockery --replace-type github.com/vektra/mockery/v3/baz/internal/foo.InternalBaz[-T]=github.com/vektra/mockery/v3/baz.*Baz\n</code></pre> <p>For example:</p> Go<pre><code>type InternalBaz[T any] struct{}\n\nfunc (*InternalBaz[T]) Foo() T {}\n\n// Becomes\ntype InternalBaz struct{}\n\nfunc (*InternalBaz) Foo() *baz.Baz {}\n</code></pre>"},{"location":"template/testify/#mock-constructors","title":"Mock Constructors","text":"<p> v2.11.0</p> <p>All mock objects have constructor functions. These constructors do basic test setup so that the expectations you set in the code are asserted before the test exits.</p> <p>Previously something like this would need to be done: Go<pre><code>factory := &amp;mocks.Factory{}\nfactory.Test(t) // so that mock does not panic when a method is unexpected\ndefer factory.AssertExpectations(t)\n</code></pre></p> <p>Instead, you may simply use the constructor: Go<pre><code>factory := mocks.NewFactory(t)\n</code></pre></p> <p>The constructor sets up common functionalities automatically</p> <ul> <li>The <code>AssertExpectations</code> method is registered to be called at the end of the tests via <code>t.Cleanup()</code> method.</li> <li>The testing.TB interface is registered on the <code>mock.Mock</code> so that tests don't panic when a call on the mock is unexpected.</li> </ul>"},{"location":"template/testify/#expecter-structs","title":"Expecter Structs","text":"<p> v2.10.0 \u00b7 <code>with-expecter: True</code></p> <p>Mockery now supports an \"expecter\" struct, which allows your tests to use type-safe methods to generate call expectations. When enabled through the <code>with-expecter: True</code> mockery configuration, you can enter into the expecter interface by simply calling <code>.EXPECT()</code> on your mock object.</p> <p>For example, given an interface such as Go<pre><code>type Requester interface {\n    Get(path string) (string, error)\n}\n</code></pre></p> <p>You can use the expecter interface as such: Go<pre><code>requesterMock := mocks.NewRequester(t)\nrequesterMock.EXPECT().Get(\"some path\").Return(\"result\", nil)\n</code></pre></p> <p>A <code>RunAndReturn</code> method is also available on the expecter struct that allows you to dynamically set a return value based on the input to the mock's call.</p> Go<pre><code>requesterMock.EXPECT().\n    Get(mock.Anything).\n    RunAndReturn(func(path string) (string, error) {\n        fmt.Println(path, \"was called\")\n        return (\"result for \" + path), nil\n    })\n</code></pre> <p>Note</p> <p>Note that the types of the arguments on the <code>EXPECT</code> methods are <code>interface{}</code>, not the actual type of your interface. The reason for this is that you may want to pass <code>mock.Any</code> as an argument, which means that the argument you pass may be an arbitrary type. The types are still provided in the expecter method docstrings.</p>"},{"location":"template/testify/#return-value-providers","title":"Return Value Providers","text":"<p> v2.20.0</p> <p>Return Value Providers can be used one of two ways. You may either define a single function with the exact same signature (number and type of input and return parameters) and pass that as a single value to <code>Return</code>, or you may pass multiple values to <code>Return</code> (one for each return parameter of the mocked function.)  If you are using the second form, for each of the return values of the mocked function, <code>Return</code> needs a function which takes the same arguments as the mocked function, and returns one of the return values. For example, if the return argument signature of <code>passthrough</code> in the above example was instead <code>(string, error)</code> in the interface, <code>Return</code> would also need a second function argument to define the error value:</p> Go<pre><code>type Proxy interface {\n    passthrough(ctx context.Context, s string) (string, error)\n}\n</code></pre> <p>First form:</p> Go<pre><code>proxyMock := mocks.NewProxy(t)\nproxyMock.On(\"passthrough\", mock.AnythingOfType(\"context.Context\"), mock.AnythingOfType(\"string\")).\nReturn(\n    func(ctx context.Context, s string) (string, error) {\n        return s, nil\n    }\n)\n</code></pre> <p>Second form:</p> Go<pre><code>proxyMock := mocks.NewProxy(t)\nproxyMock.On(\"passthrough\", mock.AnythingOfType(\"context.Context\"), mock.AnythingOfType(\"string\")).\nReturn(\n    func(ctx context.Context, s string) string {\n        return s\n    },\n    func(ctx context.Context, s string) error {\n        return nil\n    },\n)\n</code></pre>"}]}
\ No newline at end of file
diff --git a/v3.0/sitemap.xml b/v3.0/sitemap.xml
index 01a43fc0..e83e7596 100644
--- a/v3.0/sitemap.xml
+++ b/v3.0/sitemap.xml
@@ -25,19 +25,19 @@
          <lastmod>2025-01-20</lastmod>
     </url>
     <url>
-         <loc>https://vektra.github.io/mockery/latest/template-matryer/</loc>
+         <loc>https://vektra.github.io/mockery/latest/v3/</loc>
          <lastmod>2025-01-20</lastmod>
     </url>
     <url>
-         <loc>https://vektra.github.io/mockery/latest/template-testify/</loc>
+         <loc>https://vektra.github.io/mockery/latest/template/</loc>
          <lastmod>2025-01-20</lastmod>
     </url>
     <url>
-         <loc>https://vektra.github.io/mockery/latest/templates/</loc>
+         <loc>https://vektra.github.io/mockery/latest/template/matryer/</loc>
          <lastmod>2025-01-20</lastmod>
     </url>
     <url>
-         <loc>https://vektra.github.io/mockery/latest/v3/</loc>
+         <loc>https://vektra.github.io/mockery/latest/template/testify/</loc>
          <lastmod>2025-01-20</lastmod>
     </url>
 </urlset>
\ No newline at end of file
diff --git a/v3.0/sitemap.xml.gz b/v3.0/sitemap.xml.gz
index b576b722f4c122349b98ba234a860be04003a626..202da0cc9534ce1c02dbc25bf9e4433ff45d60e3 100644
GIT binary patch
delta 245
zcmV<R01E$+0+0fbBY($LrM9x2Tfd<F07}+23I@uq?fUNvNmTWm9LQewp<!mU($XA$
zCQ~dBP&?bQJ+D{+R=K0LL(4ut-pdzu=yuH<3<4DqY_Vk{k$)3nU005pV3HoW3xhy4
z#s<Z8C@TKSx?K??5nQTsG{&hev0$WG;6y?4LDM*YaqYz9)NTpFCX6IN5{*dc|Bofo
z<c?ik)z4+MFY78ouCt4p_>;RwSUKD4VGfewa`M^e<##@DZIPrgnO6|N8>yhA%|k{P
vv$gRq@)=m3@@dD5_NjaT2a}|*L3jWssnh*-yOVQ@KWq03S|R9`i3I=vOzU>f

delta 246
zcmV<S015w)0+9lcBY)zmQd`;1Enkp+03~Z11%tz`?fUNvNmTXR9_U{7p<!mU(o!Ej
zM_Viq(0JFdJ(sKir~TQuzG3gDWBI}k?XI4KMW7;r9X4zrn%;z1*Oj9o7}bQ_hhCr_
zVuRu_6q3KPc2~qm1o!F|we`A9EEs7PxKL2MH#E#2+;}m1eQ$xV39AT@L@g5f=VOI5
z`g2>!>baErvXT+<nBCRHx7=TZwRfHA=b$JqC!dW@UGs?>hor2{yn+CeRT@g#CdlYw
wb}rsUJ_GTprc{=rqOd{u2ToFFx-GvG%x7VF`n~oo#jmyf0_)#~>WT#b0Eh#9G5`Po

diff --git a/v3.0/templates/index.html b/v3.0/template/index.html
similarity index 81%
rename from v3.0/templates/index.html
rename to v3.0/template/index.html
index 98644f4a..97375f88 100644
--- a/v3.0/templates/index.html
+++ b/v3.0/template/index.html
@@ -10,13 +10,13 @@
       
       
       
-        <link rel="canonical" href="https://vektra.github.io/mockery/latest/templates/">
+        <link rel="canonical" href="https://vektra.github.io/mockery/latest/template/">
       
       
-        <link rel="prev" href="../configuration/">
+        <link rel="prev" href="../running/">
       
       
-        <link rel="next" href="../running/">
+        <link rel="next" href="testify/">
       
       
         
@@ -75,15 +75,15 @@
 <meta property="og:type" content="website" />
 <meta property="og:title" content="Templates - mockery" />
 <meta property="og:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/templates.png" />
+<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/index.png" />
 <meta property="og:image:type" content="image/png" />
 <meta property="og:image:width" content="1200" />
 <meta property="og:image:height" content="630" />
-<meta property="og:url" content="https://vektra.github.io/mockery/latest/templates/" />
+<meta property="og:url" content="https://vektra.github.io/mockery/latest/template/" />
 <meta property="twitter:card" content="summary_large_image" />
 <meta property="twitter:title" content="Templates - mockery" />
 <meta property="twitter:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/templates.png" />
+<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/index.png" />
  <link href="../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>
     html.glightbox-open { overflow: initial; height: 100%; }
     .gslide-title { margin-top: 0px; user-select: text; }
@@ -335,8 +335,6 @@
       
   
   
-    
-  
   
   
     
@@ -346,8 +344,6 @@
       
         
       
-        
-      
         
       
     
@@ -358,11 +354,11 @@
       
     
     
-    <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
+    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
       
         
         
-        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" checked>
+        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
         
           
           <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="">
@@ -382,7 +378,7 @@
             <span class="md-nav__icon md-icon"></span>
           </label>
         
-        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="true">
+        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_2">
             <span class="md-nav__icon md-icon"></span>
             
@@ -451,246 +447,6 @@
                 
   
   
-    
-  
-  
-  
-    <li class="md-nav__item md-nav__item--active">
-      
-      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
-      
-      
-        
-      
-      
-        <label class="md-nav__link md-nav__link--active" for="__toc">
-          
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-          <span class="md-nav__icon md-icon"></span>
-        </label>
-      
-      <a href="./" class="md-nav__link md-nav__link--active">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-      
-        
-
-<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
-  
-  
-  
-    
-  
-  
-    <label class="md-nav__title" for="__toc">
-      <span class="md-nav__icon md-icon"></span>
-      Table of contents
-    </label>
-    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
-      
-        <li class="md-nav__item">
-  <a href="#template-options" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Template Options
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label="Template Options">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#template-testify" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          <code class="highlight"><span class="nt">template</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;testify&quot;</span></code>
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#template-matryer" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          <code class="highlight"><span class="nt">template</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;matryer&quot;</span></code>
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#template-file" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          <code class="highlight"><span class="nt">template</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;file://</span></code>
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
-</li>
-      
-        <li class="md-nav__item">
-  <a href="#data-provided-to-templates" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Data Provided To Templates
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label="Data Provided To Templates">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#mockeryyml" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          <code>.mockery.yml</code>
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label=".mockery.yml">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#functions" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Functions
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#variables" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Variables
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#template-files" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Template Files
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label="Template Files">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#functions_1" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Functions
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#variables_1" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Variables
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
-</li>
-      
-    </ul>
-  
-</nav>
-      
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
   
   
     <li class="md-nav__item">
@@ -725,12 +481,18 @@
       
   
   
+    
+  
   
   
     
     
       
         
+          
+        
+      
+        
       
         
       
@@ -742,15 +504,17 @@
       
     
     
-    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
+    <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
       
         
         
-        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
+        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="./" class="md-nav__link md-nav__link--active">
+              
   
   <span class="md-ellipsis">
     
@@ -763,10 +527,16 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link md-nav__link--active" for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
-        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
+        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
           <label class="md-nav__title" for="__nav_3">
             <span class="md-nav__icon md-icon"></span>
             
@@ -778,13 +548,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -811,7 +583,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -1128,31 +900,17 @@
 </li>
       
         <li class="md-nav__item">
-  <a href="#data-provided-to-templates" class="md-nav__link">
+  <a href="#template-data" class="md-nav__link">
     <span class="md-ellipsis">
       
         <span class="md-typeset">
-          Data Provided To Templates
+          Template Data
         </span>
       
     </span>
   </a>
   
-    <nav class="md-nav" aria-label="Data Provided To Templates">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#mockeryyml" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          <code>.mockery.yml</code>
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label=".mockery.yml">
+    <nav class="md-nav" aria-label="Template Data">
       <ul class="md-nav__list">
         
           <li class="md-nav__item">
@@ -1184,56 +942,6 @@
       </ul>
     </nav>
   
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#template-files" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Template Files
-        </span>
-      
-    </span>
-  </a>
-  
-    <nav class="md-nav" aria-label="Template Files">
-      <ul class="md-nav__list">
-        
-          <li class="md-nav__item">
-  <a href="#functions_1" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Functions
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-          <li class="md-nav__item">
-  <a href="#variables_1" class="md-nav__link">
-    <span class="md-ellipsis">
-      
-        <span class="md-typeset">
-          Variables
-        </span>
-      
-    </span>
-  </a>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
-</li>
-        
-      </ul>
-    </nav>
-  
 </li>
       
     </ul>
@@ -1253,7 +961,7 @@
 
 
   
-    <a href="https://github.com/vektra/mockery/edit/master/docs/templates.md" title="Edit this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/edit/master/docs/template/index.md" title="Edit this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
     </a>
@@ -1262,7 +970,7 @@
     
       
     
-    <a href="https://github.com/vektra/mockery/raw/master/docs/templates.md" title="View source of this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/raw/master/docs/template/index.md" title="View source of this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.2 8.2 0 0 1-1.23-2"/></svg>
     </a>
@@ -1274,7 +982,7 @@ <h1 id="templates">Templates<a class="headerlink" href="#templates" title="Perma
 templates that you can select with the <code class="highlight"><span class="nt">template</span><span class="p">:</span></code> config parameter.</p>
 <h2 id="template-options">Template Options<a class="headerlink" href="#template-options" title="Permanent link">&para;</a></h2>
 <h3 id="template-testify"><code class="highlight"><span class="nt">template</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;testify&quot;</span></code><a class="headerlink" href="#template-testify" title="Permanent link">&para;</a></h3>
-<p><a href="../template-testify/"><code>testify</code></a> templates generate powerful, testify-based mock objects. They allow you to create expectations using argument-to-return-value matching logic.</p>
+<p><a href="template-testify.md"><code>testify</code></a> templates generate powerful, testify-based mock objects. They allow you to create expectations using argument-to-return-value matching logic.</p>
 <div class="highlight"><span class="filename">Go</span><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="kn">package</span><span class="w"> </span><span class="nx">test</span>
 <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>
 <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="kn">import</span><span class="w"> </span><span class="p">(</span>
@@ -1292,7 +1000,7 @@ <h3 id="template-testify"><code class="highlight"><span class="nt">template</spa
 <a id="__codelineno-0-15" name="__codelineno-0-15" href="#__codelineno-0-15"></a><span class="p">}</span>
 </code></pre></div>
 <h3 id="template-matryer"><code class="highlight"><span class="nt">template</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;matryer&quot;</span></code><a class="headerlink" href="#template-matryer" title="Permanent link">&para;</a></h3>
-<p><a href="../template-matryer/"><code>matryer</code></a> templates draw from the mocks generated from the project at <a href="https://github.com/matryer/moq">https://github.com/matryer/moq</a>. This project was folded into mockery, and thus moq-style mocks can be natively generated from within mockery.</p>
+<p><a href="template-matryer.md"><code>matryer</code></a> templates draw from the mocks generated from the project at <a href="https://github.com/matryer/moq">https://github.com/matryer/moq</a>. This project was folded into mockery, and thus moq-style mocks can be natively generated from within mockery.</p>
 <p>Mocks generated using this template allow you to define precise functions to be run. Example:</p>
 <div class="highlight"><span class="filename">Go</span><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="kd">func</span><span class="w"> </span><span class="nx">TestRequesterMoq</span><span class="p">(</span><span class="nx">t</span><span class="w"> </span><span class="o">*</span><span class="nx">testing</span><span class="p">.</span><span class="nx">T</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
 <a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="w">    </span><span class="nx">m</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="o">&amp;</span><span class="nx">MoqRequester</span><span class="p">{</span>
@@ -1314,18 +1022,10 @@ <h3 id="template-file"><code class="highlight"><span class="nt">template</span><
 <li><a href="https://github.com/vektra/mockery/blob/v3/internal/moq.templ"><code>moq.templ</code></a></li>
 <li><a href="https://github.com/vektra/mockery/blob/v3/internal/mockery.templ"><code>mockery.templ</code></a></li>
 </ul>
-<h2 id="data-provided-to-templates">Data Provided To Templates<a class="headerlink" href="#data-provided-to-templates" title="Permanent link">&para;</a></h2>
-<p>Mockery has two separate template instances: one for the <code>.mockery.yml</code> file, and one for the mock templates. Each instance has a different set of variables and functions available to it. All functions are <a href="https://pkg.go.dev/text/template#hdr-Pipelines">pipeline-compatible</a>.</p>
-<h3 id="mockeryyml"><code>.mockery.yml</code><a class="headerlink" href="#mockeryyml" title="Permanent link">&para;</a></h3>
-<p>As seen in the <a href="../configuration/">configuration</a> section, mockery configuration has template variables and methods available to it.</p>
-<h4 id="functions">Functions<a class="headerlink" href="#functions" title="Permanent link">&para;</a></h4>
-<p>Functions provided are in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#pkg-variables"><code>StringManipulationFuncs</code></a> variable.</p>
-<h4 id="variables">Variables<a class="headerlink" href="#variables" title="Permanent link">&para;</a></h4>
-<p>The variables available are defined in the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#ConfigData"><code>template.ConfigData</code></a> struct.</p>
-<h3 id="template-files">Template Files<a class="headerlink" href="#template-files" title="Permanent link">&para;</a></h3>
-<h4 id="functions_1">Functions<a class="headerlink" href="#functions_1" title="Permanent link">&para;</a></h4>
-<p>Template files have both <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#pkg-variables"><code>StringManipulationFuncs</code></a> and <a href="https://pkg.go.dev/github.com/vektra/mockery/v3@v3.0.0-alpha.10/template#pkg-variables"><code>TemplateMockFuncs</code></a> available as functions.</p>
-<h4 id="variables_1">Variables<a class="headerlink" href="#variables_1" title="Permanent link">&para;</a></h4>
+<h2 id="template-data">Template Data<a class="headerlink" href="#template-data" title="Permanent link">&para;</a></h2>
+<h3 id="functions">Functions<a class="headerlink" href="#functions" title="Permanent link">&para;</a></h3>
+<p>Template files have both <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/shared#pkg-variables"><code>StringManipulationFuncs</code></a> and <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#pkg-variables"><code>TemplateMockFuncs</code></a> available as functions.</p>
+<h3 id="variables">Variables<a class="headerlink" href="#variables" title="Permanent link">&para;</a></h3>
 <p>The template is supplied with the <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#Data"><code>template.Data</code></a> struct. Some attributes return types such as <a href="https://pkg.go.dev/github.com/vektra/mockery/v3@v3.0.0-alpha.10/template#MockData"><code>template.MockData</code></a> and <a href="https://pkg.go.dev/github.com/vektra/mockery/v3/template#Package"><code>template.Package</code></a> which themselves contain methods that may also be called.</p>
 
 
diff --git a/v3.0/template-matryer/index.html b/v3.0/template/matryer/index.html
similarity index 93%
rename from v3.0/template-matryer/index.html
rename to v3.0/template/matryer/index.html
index 2dfb602e..ab30faa3 100644
--- a/v3.0/template-matryer/index.html
+++ b/v3.0/template/matryer/index.html
@@ -10,19 +10,19 @@
       
       
       
-        <link rel="canonical" href="https://vektra.github.io/mockery/latest/template-matryer/">
+        <link rel="canonical" href="https://vektra.github.io/mockery/latest/template/matryer/">
       
       
-        <link rel="prev" href="../template-testify/">
+        <link rel="prev" href="../testify/">
       
       
-        <link rel="next" href="../replace-type/">
+        <link rel="next" href="../../replace-type/">
       
       
         
       
       
-      <link rel="icon" href="../assets/images/favicon.png">
+      <link rel="icon" href="../../assets/images/favicon.png">
       <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.50+insiders-4.53.15">
     
     
@@ -31,10 +31,10 @@
       
     
     
-      <link rel="stylesheet" href="../assets/stylesheets/main.6f50c755.min.css">
+      <link rel="stylesheet" href="../../assets/stylesheets/main.6f50c755.min.css">
       
         
-        <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
+        <link rel="stylesheet" href="../../assets/stylesheets/palette.ab4e12ef.min.css">
       
       
 
@@ -53,9 +53,9 @@
       
     
     
-      <link rel="stylesheet" href="../stylesheets/extra.css">
+      <link rel="stylesheet" href="../../stylesheets/extra.css">
     
-    <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
+    <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
     
       
   
@@ -75,16 +75,16 @@
 <meta property="og:type" content="website" />
 <meta property="og:title" content="matryer - mockery" />
 <meta property="og:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template-matryer.png" />
+<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/matryer.png" />
 <meta property="og:image:type" content="image/png" />
 <meta property="og:image:width" content="1200" />
 <meta property="og:image:height" content="630" />
-<meta property="og:url" content="https://vektra.github.io/mockery/latest/template-matryer/" />
+<meta property="og:url" content="https://vektra.github.io/mockery/latest/template/matryer/" />
 <meta property="twitter:card" content="summary_large_image" />
 <meta property="twitter:title" content="matryer - mockery" />
 <meta property="twitter:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template-matryer.png" />
- <link href="../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>
+<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/matryer.png" />
+ <link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>
     html.glightbox-open { overflow: initial; height: 100%; }
     .gslide-title { margin-top: 0px; user-select: text; }
     .gslide-desc { color: #666; user-select: text; }
@@ -93,7 +93,7 @@
     .gdesc-inner { font-size: 0.75rem; }
     body[data-md-color-scheme="slate"] .gdesc-inner { background: var(--md-default-bg-color);}
     body[data-md-color-scheme="slate"] .gslide-title { color: var(--md-default-fg-color);}
-    body[data-md-color-scheme="slate"] .gslide-desc { color: var(--md-default-fg-color);}</style> <script src="../assets/javascripts/glightbox.min.js"></script></head>
+    body[data-md-color-scheme="slate"] .gslide-desc { color: var(--md-default-fg-color);}</style> <script src="../../assets/javascripts/glightbox.min.js"></script></head>
   
   
     
@@ -130,7 +130,7 @@
   }
 </style>
 mockery v3 is currently in alpha. <strong>Do not use for production.</strong>
-<br><a href="../.."><strong>Click here to go to v2.</strong></a>
+<br><a href="../../.."><strong>Click here to go to v2.</strong></a>
 
           </div>
           
@@ -149,7 +149,7 @@
 
 <header class="md-header md-header--shadow" data-md-component="header">
   <nav class="md-header__inner md-grid" aria-label="Header">
-    <a href=".." title="mockery" class="md-header__button md-logo" aria-label="mockery" data-md-component="logo">
+    <a href="../.." title="mockery" class="md-header__button md-logo" aria-label="mockery" data-md-component="logo">
       
   
   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M400.1 194.8c-10.9 2.8-19.9 4.3-29.1 7.6-7.3 1.9-14.7 3.9-23.2 6.1l-.6.1c-4.2 1.2-4.6 1.3-8.5-3.2-4.7-5.3-8.1-8.7-14.6-11.9-19.7-9.6-38.7-6.8-56.4 4.7-21.2 13.7-32.1 34-31.8 59.2.3 25 17.4 45.5 41.2 48.9 22 2.8 39.8-4.6 53.8-20.5 2.1-2.6 4-5.3 6.1-8.3.8-1 1.5-2.1 2.3-3.3h-60.1c-6.5 0-8.1-4-5.9-9.3 4-9.7 11.5-25.9 15.9-34 .9-1.8 3.1-5.8 6.9-5.8h101.1c4.5-13.4 11.8-26.9 21.6-39.7 22.7-29.9 49.3-45.5 87.2-52 31.8-5.6 61.7-2.5 88.9 15.9 24.6 16.8 39.8 39.6 43.9 69.5 5.3 42.1-6.9 76.3-36.7 105.6-19.7 20.9-44.9 34-73.9 39.9-5.6 1-11.1 1.5-16.5 2-2.9.2-5.7.5-8.5.8-28.3-.6-54.2-8.7-76-27.4-15.3-13.3-25.9-29.6-31.1-48.5-3.7 7.3-8 14.4-14 21.1-21.6 29.6-50.9 48-87.9 52.9-30.6 4.1-58.9-1.8-83.9-20.5-23-17.5-36.1-40.5-39.5-69.2-4.1-34 5.9-65.4 26.4-91.3 22.2-29 51.5-47.4 87.3-53.9 29.3-6.2 57.3-1.9 82.6 15.3 16.5 10.9 28.3 25.8 36.1 43.9 1.9 2.8.6 4.4-3.1 5.3m-351.8 5.6c-1.25 0-1.56-.6-.94-1.6l6.55-8.4c.62-.9 2.18-1.5 3.43-1.5H168.6c1.2 0 1.5.9.9 1.8l-5.3 8.1c-.6 1-2.2 1.9-3.1 1.9zM1.246 229.1c-1.246 0-1.558-.7-.934-1.6l6.543-8.4c.624-.9 2.182-1.6 3.425-1.6H152.4c1.2 0 1.8 1 1.5 1.9l-2.5 7.5c-.3 1.2-1.5 1.9-2.8 1.9zm74.474 26.8c-.62.9-.31 1.8.93 1.8l67.95.3c.9 0 2.2-.9 2.2-2.1l.6-7.5c0-1.3-.6-2.2-1.9-2.2H83.2c-1.25 0-2.49.9-3.12 1.9zm501.48-18c-.2-2.6-.3-4.8-.7-7-5.6-30.8-34-48.3-63.6-41.4-29 6.5-47.7 24.9-54.5 54.2-5.6 24.3 6.2 48.9 28.6 58.9 17.2 7.5 34.3 6.6 50.8-1.9 24.6-13.6 38-32.7 39.6-59.5-.1-1.2-.1-2.3-.2-3.3"/></svg>
@@ -282,7 +282,7 @@
 
 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
   <label class="md-nav__title" for="__drawer">
-    <a href=".." title="mockery" class="md-nav__button md-logo" aria-label="mockery" data-md-component="logo">
+    <a href="../.." title="mockery" class="md-nav__button md-logo" aria-label="mockery" data-md-component="logo">
       
   
   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M400.1 194.8c-10.9 2.8-19.9 4.3-29.1 7.6-7.3 1.9-14.7 3.9-23.2 6.1l-.6.1c-4.2 1.2-4.6 1.3-8.5-3.2-4.7-5.3-8.1-8.7-14.6-11.9-19.7-9.6-38.7-6.8-56.4 4.7-21.2 13.7-32.1 34-31.8 59.2.3 25 17.4 45.5 41.2 48.9 22 2.8 39.8-4.6 53.8-20.5 2.1-2.6 4-5.3 6.1-8.3.8-1 1.5-2.1 2.3-3.3h-60.1c-6.5 0-8.1-4-5.9-9.3 4-9.7 11.5-25.9 15.9-34 .9-1.8 3.1-5.8 6.9-5.8h101.1c4.5-13.4 11.8-26.9 21.6-39.7 22.7-29.9 49.3-45.5 87.2-52 31.8-5.6 61.7-2.5 88.9 15.9 24.6 16.8 39.8 39.6 43.9 69.5 5.3 42.1-6.9 76.3-36.7 105.6-19.7 20.9-44.9 34-73.9 39.9-5.6 1-11.1 1.5-16.5 2-2.9.2-5.7.5-8.5.8-28.3-.6-54.2-8.7-76-27.4-15.3-13.3-25.9-29.6-31.1-48.5-3.7 7.3-8 14.4-14 21.1-21.6 29.6-50.9 48-87.9 52.9-30.6 4.1-58.9-1.8-83.9-20.5-23-17.5-36.1-40.5-39.5-69.2-4.1-34 5.9-65.4 26.4-91.3 22.2-29 51.5-47.4 87.3-53.9 29.3-6.2 57.3-1.9 82.6 15.3 16.5 10.9 28.3 25.8 36.1 43.9 1.9 2.8.6 4.4-3.1 5.3m-351.8 5.6c-1.25 0-1.56-.6-.94-1.6l6.55-8.4c.62-.9 2.18-1.5 3.43-1.5H168.6c1.2 0 1.5.9.9 1.8l-5.3 8.1c-.6 1-2.2 1.9-3.1 1.9zM1.246 229.1c-1.246 0-1.558-.7-.934-1.6l6.543-8.4c.624-.9 2.182-1.6 3.425-1.6H152.4c1.2 0 1.8 1 1.5 1.9l-2.5 7.5c-.3 1.2-1.5 1.9-2.8 1.9zm74.474 26.8c-.62.9-.31 1.8.93 1.8l67.95.3c.9 0 2.2-.9 2.2-2.1l.6-7.5c0-1.3-.6-2.2-1.9-2.2H83.2c-1.25 0-2.49.9-3.12 1.9zm501.48-18c-.2-2.6-.3-4.8-.7-7-5.6-30.8-34-48.3-63.6-41.4-29 6.5-47.7 24.9-54.5 54.2-5.6 24.3 6.2 48.9 28.6 58.9 17.2 7.5 34.3 6.6 50.8-1.9 24.6-13.6 38-32.7 39.6-59.5-.1-1.2-.1-2.3-.2-3.3"/></svg>
@@ -312,7 +312,7 @@
   
   
     <li class="md-nav__item">
-      <a href=".." class="md-nav__link">
+      <a href="../.." class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -346,8 +346,6 @@
       
         
       
-        
-      
     
     
       
@@ -398,7 +396,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../installation/" class="md-nav__link">
+      <a href="../../installation/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -425,7 +423,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../configuration/" class="md-nav__link">
+      <a href="../../configuration/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -452,34 +450,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
-    <li class="md-nav__item">
-      <a href="../running/" class="md-nav__link">
+      <a href="../../running/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -518,6 +489,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -536,8 +511,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -550,8 +527,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
           <label class="md-nav__title" for="__nav_3">
@@ -565,13 +548,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -758,7 +743,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../replace-type/" class="md-nav__link">
+      <a href="../../replace-type/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -848,7 +833,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../faq/" class="md-nav__link">
+      <a href="../../faq/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -875,7 +860,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../v3/" class="md-nav__link">
+      <a href="../../v3/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -971,7 +956,7 @@
 
 
   
-    <a href="https://github.com/vektra/mockery/edit/master/docs/template-matryer.md" title="Edit this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/edit/master/docs/template/matryer.md" title="Edit this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
     </a>
@@ -980,7 +965,7 @@
     
       
     
-    <a href="https://github.com/vektra/mockery/raw/master/docs/template-matryer.md" title="View source of this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/raw/master/docs/template/matryer.md" title="View source of this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.2 8.2 0 0 1-1.23-2"/></svg>
     </a>
@@ -1178,16 +1163,16 @@ <h2 id="template-data"><code>template-data</code><a class="headerlink" href="#te
     </div>
     
     
-    <script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.action.edit", "content.action.view", "navigation.indexes", "navigation.sections", "navigation.tracking", "toc.follow"], "search": "../assets/javascripts/workers/search.c7c1ca2c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
+    <script id="__config" type="application/json">{"base": "../..", "features": ["content.code.annotate", "content.code.copy", "content.action.edit", "content.action.view", "navigation.indexes", "navigation.sections", "navigation.tracking", "toc.follow"], "search": "../../assets/javascripts/workers/search.c7c1ca2c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
     
     
-      <script src="../assets/javascripts/bundle.b71cdcd1.min.js"></script>
+      <script src="../../assets/javascripts/bundle.b71cdcd1.min.js"></script>
       
         <script src="https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js"></script>
       
-        <script src="../javascripts/tablesort.js"></script>
+        <script src="../../javascripts/tablesort.js"></script>
       
-        <script src="../js/open_in_new_tab.js"></script>
+        <script src="../../js/open_in_new_tab.js"></script>
       
     
   <script id="init-glightbox">const lightbox = GLightbox({"touchNavigation": true, "loop": false, "zoomable": true, "draggable": true, "openEffect": "zoom", "closeEffect": "zoom", "slideEffect": "slide"});
diff --git a/v3.0/template-testify/index.html b/v3.0/template/testify/index.html
similarity index 96%
rename from v3.0/template-testify/index.html
rename to v3.0/template/testify/index.html
index 3894d865..e368d03c 100644
--- a/v3.0/template-testify/index.html
+++ b/v3.0/template/testify/index.html
@@ -10,19 +10,19 @@
       
       
       
-        <link rel="canonical" href="https://vektra.github.io/mockery/latest/template-testify/">
+        <link rel="canonical" href="https://vektra.github.io/mockery/latest/template/testify/">
       
       
-        <link rel="prev" href="../running/">
+        <link rel="prev" href="../">
       
       
-        <link rel="next" href="../template-matryer/">
+        <link rel="next" href="../matryer/">
       
       
         
       
       
-      <link rel="icon" href="../assets/images/favicon.png">
+      <link rel="icon" href="../../assets/images/favicon.png">
       <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.50+insiders-4.53.15">
     
     
@@ -31,10 +31,10 @@
       
     
     
-      <link rel="stylesheet" href="../assets/stylesheets/main.6f50c755.min.css">
+      <link rel="stylesheet" href="../../assets/stylesheets/main.6f50c755.min.css">
       
         
-        <link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
+        <link rel="stylesheet" href="../../assets/stylesheets/palette.ab4e12ef.min.css">
       
       
 
@@ -53,9 +53,9 @@
       
     
     
-      <link rel="stylesheet" href="../stylesheets/extra.css">
+      <link rel="stylesheet" href="../../stylesheets/extra.css">
     
-    <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
+    <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
     
       
   
@@ -75,16 +75,16 @@
 <meta property="og:type" content="website" />
 <meta property="og:title" content="testify - mockery" />
 <meta property="og:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template-testify.png" />
+<meta property="og:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/testify.png" />
 <meta property="og:image:type" content="image/png" />
 <meta property="og:image:width" content="1200" />
 <meta property="og:image:height" content="630" />
-<meta property="og:url" content="https://vektra.github.io/mockery/latest/template-testify/" />
+<meta property="og:url" content="https://vektra.github.io/mockery/latest/template/testify/" />
 <meta property="twitter:card" content="summary_large_image" />
 <meta property="twitter:title" content="testify - mockery" />
 <meta property="twitter:description" content="Create mock implementations of your Golang interfaces using mockery and testify." />
-<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template-testify.png" />
- <link href="../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>
+<meta property="twitter:image" content="https://vektra.github.io/mockery/latest/assets/images/social/template/testify.png" />
+ <link href="../../assets/stylesheets/glightbox.min.css" rel="stylesheet"/><style>
     html.glightbox-open { overflow: initial; height: 100%; }
     .gslide-title { margin-top: 0px; user-select: text; }
     .gslide-desc { color: #666; user-select: text; }
@@ -93,7 +93,7 @@
     .gdesc-inner { font-size: 0.75rem; }
     body[data-md-color-scheme="slate"] .gdesc-inner { background: var(--md-default-bg-color);}
     body[data-md-color-scheme="slate"] .gslide-title { color: var(--md-default-fg-color);}
-    body[data-md-color-scheme="slate"] .gslide-desc { color: var(--md-default-fg-color);}</style> <script src="../assets/javascripts/glightbox.min.js"></script></head>
+    body[data-md-color-scheme="slate"] .gslide-desc { color: var(--md-default-fg-color);}</style> <script src="../../assets/javascripts/glightbox.min.js"></script></head>
   
   
     
@@ -130,7 +130,7 @@
   }
 </style>
 mockery v3 is currently in alpha. <strong>Do not use for production.</strong>
-<br><a href="../.."><strong>Click here to go to v2.</strong></a>
+<br><a href="../../.."><strong>Click here to go to v2.</strong></a>
 
           </div>
           
@@ -149,7 +149,7 @@
 
 <header class="md-header md-header--shadow" data-md-component="header">
   <nav class="md-header__inner md-grid" aria-label="Header">
-    <a href=".." title="mockery" class="md-header__button md-logo" aria-label="mockery" data-md-component="logo">
+    <a href="../.." title="mockery" class="md-header__button md-logo" aria-label="mockery" data-md-component="logo">
       
   
   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M400.1 194.8c-10.9 2.8-19.9 4.3-29.1 7.6-7.3 1.9-14.7 3.9-23.2 6.1l-.6.1c-4.2 1.2-4.6 1.3-8.5-3.2-4.7-5.3-8.1-8.7-14.6-11.9-19.7-9.6-38.7-6.8-56.4 4.7-21.2 13.7-32.1 34-31.8 59.2.3 25 17.4 45.5 41.2 48.9 22 2.8 39.8-4.6 53.8-20.5 2.1-2.6 4-5.3 6.1-8.3.8-1 1.5-2.1 2.3-3.3h-60.1c-6.5 0-8.1-4-5.9-9.3 4-9.7 11.5-25.9 15.9-34 .9-1.8 3.1-5.8 6.9-5.8h101.1c4.5-13.4 11.8-26.9 21.6-39.7 22.7-29.9 49.3-45.5 87.2-52 31.8-5.6 61.7-2.5 88.9 15.9 24.6 16.8 39.8 39.6 43.9 69.5 5.3 42.1-6.9 76.3-36.7 105.6-19.7 20.9-44.9 34-73.9 39.9-5.6 1-11.1 1.5-16.5 2-2.9.2-5.7.5-8.5.8-28.3-.6-54.2-8.7-76-27.4-15.3-13.3-25.9-29.6-31.1-48.5-3.7 7.3-8 14.4-14 21.1-21.6 29.6-50.9 48-87.9 52.9-30.6 4.1-58.9-1.8-83.9-20.5-23-17.5-36.1-40.5-39.5-69.2-4.1-34 5.9-65.4 26.4-91.3 22.2-29 51.5-47.4 87.3-53.9 29.3-6.2 57.3-1.9 82.6 15.3 16.5 10.9 28.3 25.8 36.1 43.9 1.9 2.8.6 4.4-3.1 5.3m-351.8 5.6c-1.25 0-1.56-.6-.94-1.6l6.55-8.4c.62-.9 2.18-1.5 3.43-1.5H168.6c1.2 0 1.5.9.9 1.8l-5.3 8.1c-.6 1-2.2 1.9-3.1 1.9zM1.246 229.1c-1.246 0-1.558-.7-.934-1.6l6.543-8.4c.624-.9 2.182-1.6 3.425-1.6H152.4c1.2 0 1.8 1 1.5 1.9l-2.5 7.5c-.3 1.2-1.5 1.9-2.8 1.9zm74.474 26.8c-.62.9-.31 1.8.93 1.8l67.95.3c.9 0 2.2-.9 2.2-2.1l.6-7.5c0-1.3-.6-2.2-1.9-2.2H83.2c-1.25 0-2.49.9-3.12 1.9zm501.48-18c-.2-2.6-.3-4.8-.7-7-5.6-30.8-34-48.3-63.6-41.4-29 6.5-47.7 24.9-54.5 54.2-5.6 24.3 6.2 48.9 28.6 58.9 17.2 7.5 34.3 6.6 50.8-1.9 24.6-13.6 38-32.7 39.6-59.5-.1-1.2-.1-2.3-.2-3.3"/></svg>
@@ -282,7 +282,7 @@
 
 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
   <label class="md-nav__title" for="__drawer">
-    <a href=".." title="mockery" class="md-nav__button md-logo" aria-label="mockery" data-md-component="logo">
+    <a href="../.." title="mockery" class="md-nav__button md-logo" aria-label="mockery" data-md-component="logo">
       
   
   <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M400.1 194.8c-10.9 2.8-19.9 4.3-29.1 7.6-7.3 1.9-14.7 3.9-23.2 6.1l-.6.1c-4.2 1.2-4.6 1.3-8.5-3.2-4.7-5.3-8.1-8.7-14.6-11.9-19.7-9.6-38.7-6.8-56.4 4.7-21.2 13.7-32.1 34-31.8 59.2.3 25 17.4 45.5 41.2 48.9 22 2.8 39.8-4.6 53.8-20.5 2.1-2.6 4-5.3 6.1-8.3.8-1 1.5-2.1 2.3-3.3h-60.1c-6.5 0-8.1-4-5.9-9.3 4-9.7 11.5-25.9 15.9-34 .9-1.8 3.1-5.8 6.9-5.8h101.1c4.5-13.4 11.8-26.9 21.6-39.7 22.7-29.9 49.3-45.5 87.2-52 31.8-5.6 61.7-2.5 88.9 15.9 24.6 16.8 39.8 39.6 43.9 69.5 5.3 42.1-6.9 76.3-36.7 105.6-19.7 20.9-44.9 34-73.9 39.9-5.6 1-11.1 1.5-16.5 2-2.9.2-5.7.5-8.5.8-28.3-.6-54.2-8.7-76-27.4-15.3-13.3-25.9-29.6-31.1-48.5-3.7 7.3-8 14.4-14 21.1-21.6 29.6-50.9 48-87.9 52.9-30.6 4.1-58.9-1.8-83.9-20.5-23-17.5-36.1-40.5-39.5-69.2-4.1-34 5.9-65.4 26.4-91.3 22.2-29 51.5-47.4 87.3-53.9 29.3-6.2 57.3-1.9 82.6 15.3 16.5 10.9 28.3 25.8 36.1 43.9 1.9 2.8.6 4.4-3.1 5.3m-351.8 5.6c-1.25 0-1.56-.6-.94-1.6l6.55-8.4c.62-.9 2.18-1.5 3.43-1.5H168.6c1.2 0 1.5.9.9 1.8l-5.3 8.1c-.6 1-2.2 1.9-3.1 1.9zM1.246 229.1c-1.246 0-1.558-.7-.934-1.6l6.543-8.4c.624-.9 2.182-1.6 3.425-1.6H152.4c1.2 0 1.8 1 1.5 1.9l-2.5 7.5c-.3 1.2-1.5 1.9-2.8 1.9zm74.474 26.8c-.62.9-.31 1.8.93 1.8l67.95.3c.9 0 2.2-.9 2.2-2.1l.6-7.5c0-1.3-.6-2.2-1.9-2.2H83.2c-1.25 0-2.49.9-3.12 1.9zm501.48-18c-.2-2.6-.3-4.8-.7-7-5.6-30.8-34-48.3-63.6-41.4-29 6.5-47.7 24.9-54.5 54.2-5.6 24.3 6.2 48.9 28.6 58.9 17.2 7.5 34.3 6.6 50.8-1.9 24.6-13.6 38-32.7 39.6-59.5-.1-1.2-.1-2.3-.2-3.3"/></svg>
@@ -312,7 +312,7 @@
   
   
     <li class="md-nav__item">
-      <a href=".." class="md-nav__link">
+      <a href="../.." class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -346,8 +346,6 @@
       
         
       
-        
-      
     
     
       
@@ -398,7 +396,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../installation/" class="md-nav__link">
+      <a href="../../installation/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -425,7 +423,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../configuration/" class="md-nav__link">
+      <a href="../../configuration/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -452,34 +450,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
-    <li class="md-nav__item">
-      <a href="../running/" class="md-nav__link">
+      <a href="../../running/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -518,6 +489,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -536,8 +511,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -550,8 +527,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
           <label class="md-nav__title" for="__nav_3">
@@ -565,6 +548,8 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
@@ -741,7 +726,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -829,7 +814,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../replace-type/" class="md-nav__link">
+      <a href="../../replace-type/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -919,7 +904,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../faq/" class="md-nav__link">
+      <a href="../../faq/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -946,7 +931,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../v3/" class="md-nav__link">
+      <a href="../../v3/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -1113,7 +1098,7 @@
 
 
   
-    <a href="https://github.com/vektra/mockery/edit/master/docs/template-testify.md" title="Edit this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/edit/master/docs/template/testify.md" title="Edit this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
     </a>
@@ -1122,7 +1107,7 @@
     
       
     
-    <a href="https://github.com/vektra/mockery/raw/master/docs/template-testify.md" title="View source of this page" class="md-content__button md-icon">
+    <a href="https://github.com/vektra/mockery/raw/master/docs/template/testify.md" title="View source of this page" class="md-content__button md-icon">
       
       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.2 8.2 0 0 1-1.23-2"/></svg>
     </a>
@@ -1536,16 +1521,16 @@ <h3 id="return-value-providers">Return Value Providers<a class="headerlink" href
     </div>
     
     
-    <script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.action.edit", "content.action.view", "navigation.indexes", "navigation.sections", "navigation.tracking", "toc.follow"], "search": "../assets/javascripts/workers/search.c7c1ca2c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
+    <script id="__config" type="application/json">{"base": "../..", "features": ["content.code.annotate", "content.code.copy", "content.action.edit", "content.action.view", "navigation.indexes", "navigation.sections", "navigation.tracking", "toc.follow"], "search": "../../assets/javascripts/workers/search.c7c1ca2c.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
     
     
-      <script src="../assets/javascripts/bundle.b71cdcd1.min.js"></script>
+      <script src="../../assets/javascripts/bundle.b71cdcd1.min.js"></script>
       
         <script src="https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js"></script>
       
-        <script src="../javascripts/tablesort.js"></script>
+        <script src="../../javascripts/tablesort.js"></script>
       
-        <script src="../js/open_in_new_tab.js"></script>
+        <script src="../../js/open_in_new_tab.js"></script>
       
     
   <script id="init-glightbox">const lightbox = GLightbox({"touchNavigation": true, "loop": false, "zoomable": true, "draggable": true, "openEffect": "zoom", "closeEffect": "zoom", "slideEffect": "slide"});
diff --git a/v3.0/v3/index.html b/v3.0/v3/index.html
index eaa18122..5d946eae 100644
--- a/v3.0/v3/index.html
+++ b/v3.0/v3/index.html
@@ -344,8 +344,6 @@
       
         
       
-        
-      
     
     
       
@@ -449,33 +447,6 @@
   
   
   
-    <li class="md-nav__item">
-      <a href="../templates/" class="md-nav__link">
-        
-  
-  <span class="md-ellipsis">
-    
-  
-    Templates
-  
-
-    
-  </span>
-  
-  
-
-      </a>
-    </li>
-  
-
-              
-            
-              
-                
-  
-  
-  
-  
     <li class="md-nav__item">
       <a href="../running/" class="md-nav__link">
         
@@ -514,6 +485,10 @@
     
       
         
+          
+        
+      
+        
       
         
       
@@ -532,8 +507,10 @@
         <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
         
           
-          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
-            
+          
+          <div class="md-nav__link md-nav__container">
+            <a href="../template/" class="md-nav__link ">
+              
   
   <span class="md-ellipsis">
     
@@ -546,8 +523,14 @@
   
   
 
-            <span class="md-nav__icon md-icon"></span>
-          </label>
+            </a>
+            
+              
+              <label class="md-nav__link " for="__nav_3" id="__nav_3_label" tabindex="">
+                <span class="md-nav__icon md-icon"></span>
+              </label>
+            
+          </div>
         
         <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
           <label class="md-nav__title" for="__nav_3">
@@ -561,13 +544,15 @@
           <ul class="md-nav__list" data-md-scrollfix>
             
               
+            
+              
                 
   
   
   
   
     <li class="md-nav__item">
-      <a href="../template-testify/" class="md-nav__link">
+      <a href="../template/testify/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -594,7 +579,7 @@
   
   
     <li class="md-nav__item">
-      <a href="../template-matryer/" class="md-nav__link">
+      <a href="../template/matryer/" class="md-nav__link">
         
   
   <span class="md-ellipsis">
@@ -962,9 +947,9 @@
 <h1 id="v3-release">v3 Release<a class="headerlink" href="#v3-release" title="Permanent link">&para;</a></h1>
 <p>Mockery releases version 3 of the project that provides a number of high-profile benefits over v2:</p>
 <ol>
-<li>Allows generation of <a href="template-moq.md"><code>moq</code></a>-style templates. The <a href="https://github.com/matryer/moq">https://github.com/matryer/moq</a> project is being folded into mockery to combine the speed and configuration flexibility of mockery with the simplicity of moq-style mocks.</li>
+<li>Allows generation of <a href="templates/matryer.md"><code>matryer</code></a>-style templates. The <a href="https://github.com/matryer/moq">https://github.com/matryer/moq</a> project is being folded into mockery to combine the speed and configuration flexibility of mockery with the simplicity of moq-style mocks.</li>
 <li>Changes the generation scheme to be entirely driven off of Go templates. This means that the data provided to templates is considered as part of the public API.</li>
-<li>Mockery now allows users to specify their own templates to make code generation far easier. Mockery handles the problem of parsing source code and enables you to focus on creating <a href="../templates/#template-file">your own interface implementations</a>.</li>
+<li>Mockery now allows users to specify their own templates to make code generation far easier. Mockery handles the problem of parsing source code and enables you to focus on creating <a href="templates.md#template-file">your own interface implementations</a>.</li>
 <li>Shedding all deprecated variables and simplifying the way in which mocks are configured.</li>
 </ol>
 <h2 id="v2-migration">v2 Migration<a class="headerlink" href="#v2-migration" title="Permanent link">&para;</a></h2>