This commit is contained in:
hoteas 2018-05-29 17:39:37 +00:00
parent 5cbef50464
commit 9ff8f50fb9
3 changed files with 36 additions and 74 deletions

View File

@ -4,7 +4,9 @@
<bookmark url="file://$PROJECT_DIR$/var.go" line="12" />
</component>
<component name="ChangeListManager">
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="" />
<list default="true" readonly="true" id="03ed5703-81a1-441b-849c-c426276586b7" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path=".idea/dataSources.local.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -24,11 +26,9 @@
<file leaf-file-name="main.go" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="705">
<caret line="92" column="32" lean-forward="false" selection-start-line="92" selection-start-column="32" selection-end-line="92" selection-end-column="32" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<state relative-caret-position="240">
<caret line="68" column="29" lean-forward="false" selection-start-line="68" selection-start-column="29" selection-end-line="68" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
@ -46,8 +46,8 @@
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/tpt/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="10" lean-forward="false" selection-start-line="19" selection-start-column="10" selection-end-line="19" selection-end-column="10" />
<state relative-caret-position="135">
<caret line="9" column="36" lean-forward="false" selection-start-line="9" selection-start-column="36" selection-end-line="9" selection-end-column="75" />
<folding />
</state>
</provider>
@ -105,16 +105,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="obj.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/obj.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="990">
<caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="cache_db.go" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cache_db.go">
<provider selected="true" editor-type-id="text-editor">
@ -130,8 +120,8 @@
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="HTML File" />
<option value="Go File" />
<option value="HTML File" />
</list>
</option>
</component>
@ -198,6 +188,7 @@
<option value="$PROJECT_DIR$/cache/cache_redis.go" />
<option value="$PROJECT_DIR$/db.go" />
<option value="$PROJECT_DIR$/example/main.go" />
<option value="$PROJECT_DIR$/example/tpt/test.html" />
</list>
</option>
</component>
@ -211,7 +202,7 @@
<servers />
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds">
<option name="x" value="55" />
<option name="width" value="943" />
<option name="height" value="1087" />
@ -231,6 +222,10 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="AndroidView" />
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -248,12 +243,6 @@
<item name="hotime" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
<item name="config" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="hotime" type="b2602c69:ProjectViewProjectNode" />
<item name="hotime" type="462c0819:PsiDirectoryNode" />
@ -264,10 +253,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="AndroidView" />
<pane id="PackagesPane" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
@ -476,6 +461,8 @@
<workItem from="1523288830673" duration="6214000" />
<workItem from="1523341635238" duration="10000" />
<workItem from="1523384832228" duration="740000" />
<workItem from="1523396302828" duration="1154000" />
<workItem from="1523450416943" duration="1452000" />
</task>
<task id="LOCAL-00001">
<created>1500458878821</created>
@ -705,7 +692,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="108487000" />
<option name="totallyTimeSpent" value="111093000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -717,8 +704,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="54" y="-8" width="1874" height="1096" extended-state="6" />
<editor active="true" />
<frame x="55" y="0" width="943" height="1087" extended-state="0" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -726,12 +712,12 @@
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32395834" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912722" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.6322917" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32805908" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23153253" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.49263874" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24972437" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
@ -771,21 +757,11 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/func.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<folding />
</state>
</provider>
</entry>
@ -793,7 +769,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
@ -843,7 +818,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="990">
<caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
@ -859,7 +833,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -867,9 +840,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<folding />
</state>
</provider>
</entry>
@ -884,7 +855,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="11" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
@ -948,9 +918,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<folding />
</state>
</provider>
</entry>
@ -958,7 +926,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="11" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
@ -1029,9 +996,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="29" lean-forward="false" selection-start-line="18" selection-start-column="29" selection-end-line="18" selection-end-column="29" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<folding />
</state>
</provider>
</entry>
@ -1047,9 +1012,7 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<folding />
</state>
</provider>
</entry>
@ -1088,7 +1051,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="5" selection-end-line="7" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
@ -1096,7 +1058,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -1104,7 +1065,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="990">
<caret line="66" column="24" lean-forward="false" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
@ -1168,19 +1128,18 @@
</entry>
<entry file="file://$PROJECT_DIR$/example/tpt/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="10" lean-forward="false" selection-start-line="19" selection-start-column="10" selection-end-line="19" selection-end-column="10" />
<state relative-caret-position="135">
<caret line="9" column="36" lean-forward="false" selection-start-line="9" selection-start-column="36" selection-end-line="9" selection-end-column="75" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/tpt/test.html" />
<entry file="file://$PROJECT_DIR$/example/main.go">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="705">
<caret line="92" column="32" lean-forward="false" selection-start-line="92" selection-start-column="32" selection-end-line="92" selection-end-column="32" />
<folding>
<element signature="e#14#209#0" expanded="true" />
</folding>
<state relative-caret-position="240">
<caret line="68" column="29" lean-forward="false" selection-start-line="68" selection-start-column="29" selection-end-line="68" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>

View File

@ -302,8 +302,10 @@ func (this *Application) handler(w http.ResponseWriter, req *http.Request) {
if value, ok := mimeMaps[mimeStr]; ok {
header.Set("Content-Type", value)
}
if this.Config.GetInt("debug")!=1{
header.Set("Cache-Control", "public")
}
//w.Write(data)
http.ServeFile(w, req, path)

1
var.go
View File

@ -21,4 +21,5 @@ var Config = Map{
"cacheLongTime": 60 * 60 * 24 * 30,
"sessionName": "HOTIME",
"error": Map{},
"debug":1,//debug 0关闭1开启
}