2021-03-26 15:24:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/ *  
						 
					
						
							
								
									
										
										
										
											2022-07-18 19:22:55 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 Copyright  2022  The  KubeVela  Authors . 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-26 15:24:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-18 19:22:55 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 Licensed  under  the  Apache  License ,  Version  2.0  ( the  "License" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 you  may  not  use  this  file  except  in  compliance  with  the  License . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 You  may  obtain  a  copy  of  the  License  at 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-26 15:24:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-18 19:22:55 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 	http : //www.apache.org/licenses/LICENSE-2.0
 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-26 15:24:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-18 19:22:55 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 Unless  required  by  applicable  law  or  agreed  to  in  writing ,  software 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 distributed  under  the  License  is  distributed  on  an  "AS IS"  BASIS , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 WITHOUT  WARRANTIES  OR  CONDITIONS  OF  ANY  KIND ,  either  express  or  implied . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 See  the  License  for  the  specific  language  governing  permissions  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 limitations  under  the  License . 
							 
						 
					
						
							
								
									
										
										
										
											2021-03-26 15:24:19 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								* /  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								package  main  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								import  (  
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"fmt" 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"io" 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"io/fs" 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"log" 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"os" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"path/filepath" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"strings" 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 14:19:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									"github.com/kubevela/pkg/util/slices" 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"github.com/spf13/cobra" 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-29 15:59:29 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"github.com/spf13/cobra/doc" 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"github.com/oam-dev/kubevela/apis/types" 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-23 13:03:38 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									"github.com/oam-dev/kubevela/references/cli" 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								)  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								// PrintCLIByTag print custom defined index
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								func  PrintCLIByTag ( cmd  * cobra . Command ,  all  [ ] * cobra . Command ,  tag  string )  string  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									var  result  string 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 14:19:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									var  pl  [ ] cli . Printable 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									for  _ ,  c  :=  range  all  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ! c . IsAvailableCommand ( )  ||  c . IsAdditionalHelpTopicCommand ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											continue 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  val ,  ok  :=  c . Annotations [ types . TagCommandType ] ;  ! ok  ||  val  !=  tag  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											continue 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										cname  :=  cmd . Name ( )  +  " "  +  c . Name ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										link  :=  cname 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										link  =  strings . Replace ( link ,  " " ,  "_" ,  - 1 ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 14:19:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										pl  =  append ( pl ,  cli . Printable { Order :  c . Annotations [ types . TagCommandOrder ] ,  Short :  fmt . Sprintf ( "* [%s](%s)\t - %s\n" ,  cname ,  link ,  c . Long ) } ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 14:19:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									slices . Sort ( pl ,  func ( i ,  j  cli . Printable )  bool  {  return  i . Order  <  j . Order  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  _ ,  v  :=  range  pl  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-21 14:19:36 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										result  +=  v . Short 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									result  +=  "\n" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  result 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-20 10:26:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// GenMarkdownTreeForIndex will generate the Markdown doc for vela index
  
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								func  GenMarkdownTreeForIndex ( cmd  * cobra . Command ,  dir  string )  error  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									basename  :=  strings . Replace ( cmd . CommandPath ( ) ,  " " ,  "_" ,  - 1 )  +  ".md" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									filename  :=  filepath . Join ( dir ,  basename ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									f ,  err  :=  os . Create ( filename ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									defer  f . Close ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  _ ,  err  =  io . WriteString ( f ,  "---\ntitle: CLI Commands\n---\n\n\n" ) ;  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for  _ ,  tp  :=  range  [ ] string { types . TypeStart ,  types . TypeApp ,  types . TypeCD ,  types . TypeExtension ,  types . TypeSystem }  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// write header of type
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										_ ,  err  =  io . WriteString ( f ,  "## " + tp + "\n\n" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										str  :=  PrintCLIByTag ( cmd ,  cmd . Commands ( ) ,  tp ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// write header of type
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										_ ,  err  =  io . WriteString ( f ,  str ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-29 15:59:29 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									_ ,  err  =  io . WriteString ( f ,  "###### Auto generated by [script in KubeVela](https://github.com/kubevela/kubevela/tree/master/hack/docgen)." ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								func  main ( )  {  
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									rootPath  :=  "../kubevela.io/docs/cli/" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  len ( os . Args )  >  1  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										rootPath  =  os . Args [ 1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									fmt . Println ( "scanning rootPath of CLI docs for replace: " ,  rootPath ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-23 13:03:38 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									vela  :=  cli . NewCommand ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									err  :=  doc . GenMarkdownTree ( vela ,  rootPath ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										log . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									err  =  GenMarkdownTreeForIndex ( vela ,  rootPath ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										log . Fatal ( "generate docs for vela index fail" ,  err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									err  =  filepath . Walk ( rootPath ,  func ( path  string ,  info  fs . FileInfo ,  err  error )  error  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  info . IsDir ( )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-29 19:34:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										data ,  err  :=  os . ReadFile ( path ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  err 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										lines  :=  strings . Split ( string ( data ) ,  "\n" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  len ( lines )  <  1  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// check first line to make sure it's autogenerated docs
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										firstL  :=  lines [ 0 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ! strings . HasPrefix ( firstL ,  "## vela" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// find the last line and add some link.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										var  lastIdx  int 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  idx  :=  len ( lines )  -  1 ;  idx  >=  0 ;  idx --  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  strings . Contains ( lines [ idx ] ,  "Auto generated" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												lastIdx  =  idx 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												break 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  lastIdx  ==  0  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											return  nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-29 15:59:29 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										lines [ lastIdx ]  =  "#### Go Back to [CLI Commands](vela) Homepage.\n\n\n###### Auto generated by [spf13/cobra script in KubeVela](https://github.com/kubevela/kubevela/tree/master/hack/docgen)." 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// update the title format
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										title  :=  strings . TrimPrefix ( firstL ,  "## " ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										lines [ 0 ]  =  "---" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										newlines  :=  [ ] string { "---" ,  "title: "  +  title } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  idx ,  line  :=  range  lines  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 17:45:20 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											if  strings . Contains ( line ,  "[vela](vela.md)" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												lines [ idx ]  =  "" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												continue 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											if  strings . Contains ( line ,  ".md" )  &&  strings . Contains ( line ,  "](" )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												lines [ idx ]  =  strings . Replace ( line ,  ".md" ,  "" ,  - 1 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										newlines  =  append ( newlines ,  lines ... ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										newcontent  :=  strings . Join ( newlines ,  "\n" ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-29 19:34:45 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  os . WriteFile ( path ,  [ ] byte ( newcontent ) ,  info . Mode ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-10 15:28:04 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} ) 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-20 14:50:30 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									if  err  !=  nil  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										log . Fatal ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}